X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FCodeCleaner%2FAbstractClassPass.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FCodeCleaner%2FAbstractClassPass.php;h=81d12b6a5f84a4fa82c908b588aa7bdcb5257ea5;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=66eaf42c144ac995e6e45ae77ec6e973e0a9fcd4;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php index 66eaf42c1..81d12b6a5 100644 --- a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php @@ -36,11 +36,11 @@ class AbstractClassPass extends CodeCleanerPass $this->abstractMethods = []; } elseif ($node instanceof ClassMethod) { if ($node->isAbstract()) { - $name = sprintf('%s::%s', $this->class->name, $node->name); + $name = \sprintf('%s::%s', $this->class->name, $node->name); $this->abstractMethods[] = $name; if ($node->stmts !== null) { - $msg = sprintf('Abstract function %s cannot contain body', $name); + $msg = \sprintf('Abstract function %s cannot contain body', $name); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } } @@ -55,14 +55,14 @@ class AbstractClassPass extends CodeCleanerPass public function leaveNode(Node $node) { if ($node instanceof Class_) { - $count = count($this->abstractMethods); + $count = \count($this->abstractMethods); if ($count > 0 && !$node->isAbstract()) { - $msg = sprintf( + $msg = \sprintf( 'Class %s contains %d abstract method%s must therefore be declared abstract or implement the remaining methods (%s)', $node->name, $count, ($count === 1) ? '' : 's', - implode(', ', $this->abstractMethods) + \implode(', ', $this->abstractMethods) ); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); }