Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / psy / psysh / src / CodeCleaner / LegacyEmptyPass.php
similarity index 87%
rename from vendor/psy/psysh/src/Psy/CodeCleaner/LegacyEmptyPass.php
rename to vendor/psy/psysh/src/CodeCleaner/LegacyEmptyPass.php
index dc5a01ed74297792d2eee57e7d5440e0459bd5ea..d1dba096c3b38114f65baeba3fc01a0431e3dd8d 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * This file is part of Psy Shell.
  *
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -22,6 +22,13 @@ use Psy\Exception\ParseErrorException;
  */
 class LegacyEmptyPass extends CodeCleanerPass
 {
+    private $atLeastPhp55;
+
+    public function __construct()
+    {
+        $this->atLeastPhp55 = version_compare(PHP_VERSION, '5.5', '>=');
+    }
+
     /**
      * Validate use of empty in PHP < 5.5.
      *
@@ -31,7 +38,7 @@ class LegacyEmptyPass extends CodeCleanerPass
      */
     public function enterNode(Node $node)
     {
-        if (version_compare(PHP_VERSION, '5.5', '>=')) {
+        if ($this->atLeastPhp55) {
             return;
         }