Calling get_class() without arguments is deprecated v0.1 v0.1.1
authorSebastian Brix <sebastian.brix@graph-it.com>
Mon, 22 Sep 2025 07:07:26 +0000 (09:07 +0200)
committerSebastian Brix <sebastian.brix@graph-it.com>
Mon, 22 Sep 2025 07:07:26 +0000 (09:07 +0200)
src/ConcatParser.php
src/EmptyParser.php
src/GrammerParser.php
src/GreedyMultiParser.php
src/LazyAltParser.php
src/RegexParser.php
src/StringParser.php

index 92d6e4fa25379110ba86cf9278d4a279f1b9d53c..0caa202d9e4ef853cddcdb1307209cc9794195c9 100644 (file)
@@ -10,7 +10,7 @@ class ConcatParser extends BaseParser
    */
   public function __construct(array $internals, $generator = null)
   {
-    $this->description = 'new '.get_class().'('.$this->serializeInternals($internals).')';
+    $this->description = 'new '.self::class.'('.$this->serializeInternals($internals).')';
     parent::__construct($internals, $generator);
   }
 
index ffdd253988b2f29383cecba452eb0ea53f276adf..32051a10e4d8033e202dd4f0c99a8b8d703c6c01 100644 (file)
@@ -9,7 +9,7 @@ class EmptyParser extends BaseParser
    */
   public function __construct($generator = null)
   {
-    $this->description = 'new '.get_class().'()';
+    $this->description = 'new '.self::class.'()';
 
     parent::__construct(array(), $generator);
   }
index 640a9c297098b189d8bdaa8e9c3b4bf936703761..df90749ad9eef7f8b1c19ae0211982f6229363e4 100644 (file)
@@ -14,7 +14,7 @@ class GrammerParser extends BaseParser
    */
   public function __construct($s, array $internals, $generator = null)
   {
-    $this->description = 'new '.get_class().'('.$this->serializeInternals($internals).')';
+    $this->description = 'new '.self::class.'('.$this->serializeInternals($internals).')';
     parent::__construct($internals, $generator);
 
     $this->s = (string)$s;
index b1176638987cb2d46912dd3bc99ea1f0fcab8ff8..a2f889789df5ef22bf11d050268ddd343d240099 100644 (file)
@@ -21,7 +21,7 @@ class GreedyMultiParser extends BaseParser
     $this->lower = $lower;
     $this->optional = $optional;
 
-    $this->description = 'new '.get_class()."({$internal}, {$lower}, {$optional})";
+    $this->description = 'new '.self::class."({$internal}, {$lower}, {$optional})";
     parent::__construct(array($internal), $generator);
   }
 
index 7e8fd50f120c6934d92fd366bf2f59e43d68e8e8..14d8cbf8f2c530cfeae8a28a200b622a41878d39 100644 (file)
@@ -14,7 +14,7 @@ class LazyAltParser extends BaseParser
       throw new GrammerException('At least one internal parser is needed!');
     }
 
-    $this->description = 'new '.get_class().'('.$this->serializeInternals($internals).')';
+    $this->description = 'new '.self::class.'('.$this->serializeInternals($internals).')';
     parent::__construct($internals, $generator);
   }
 
index ac36e940fe78cbbbfbd55d3bae59ad8f062ef6b3..c022925bb5ac080d62b28db0f8864792d6529d5b 100644 (file)
@@ -18,7 +18,7 @@ class RegexParser extends BaseParser
       throw new GrammerException('Pattern {$this->pattern} must anchor at the beginning of the string!');
     }
 
-    $this->description = 'new '.get_class().'('.var_export($this->pattern, true).')';
+    $this->description = 'new '.self::class.'('.var_export($this->pattern, true).')';
     parent::__construct(array(), $generator);
   }
 
index d07eeadc3a88efa6c09e7db9dd347a783a4bce9f..affd3a8d00c92442f26b9d1e212ba8fbd2dc8355 100644 (file)
@@ -15,7 +15,7 @@ class StringParser extends BaseParser
   {
     $this->needle = (string)$needle;
 
-    $this->description = 'new '.get_class().'('.var_export($this->needle, true).')';
+    $this->description = 'new '.self::class.'('.var_export($this->needle, true).')';
     parent::__construct(array(), $generator);
   }