diff vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
line wrap: on
line diff
--- a/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php	Thu Feb 28 13:11:55 2019 +0000
@@ -75,15 +75,15 @@
     public function afterTraverse(array $nodes)
     {
         // prepend a `markStart` call
-        array_unshift($nodes, $this->maybeExpression($this->getStartCall()));
+        \array_unshift($nodes, $this->maybeExpression($this->getStartCall()));
 
         // append a `markEnd` call (wrapping the final node, if it's an expression)
-        $last = $nodes[count($nodes) - 1];
+        $last = $nodes[\count($nodes) - 1];
         if ($last instanceof Expr) {
-            array_pop($nodes);
+            \array_pop($nodes);
             $nodes[] = $this->getEndCall($last);
         } elseif ($last instanceof Expression) {
-            array_pop($nodes);
+            \array_pop($nodes);
             $nodes[] = new Expression($this->getEndCall($last->expr), $last->getAttributes());
         } elseif ($last instanceof Return_) {
             // nothing to do here, we're already ending with a return call
@@ -134,6 +134,6 @@
      */
     private function maybeExpression($expr, $attrs = [])
     {
-        return class_exists('PhpParser\Node\Stmt\Expression') ? new Expression($expr, $attrs) : $expr;
+        return \class_exists('PhpParser\Node\Stmt\Expression') ? new Expression($expr, $attrs) : $expr;
     }
 }