Mercurial > hg > isophonics-drupal-site
comparison vendor/psy/psysh/src/Psy/CodeCleaner/ValidFunctionNamePass.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
76 // if function name is an expression or a variable, give it a pass for now. | 76 // if function name is an expression or a variable, give it a pass for now. |
77 $name = $node->name; | 77 $name = $node->name; |
78 if (!$name instanceof Expr && !$name instanceof Variable) { | 78 if (!$name instanceof Expr && !$name instanceof Variable) { |
79 $shortName = implode('\\', $name->parts); | 79 $shortName = implode('\\', $name->parts); |
80 $fullName = $this->getFullyQualifiedName($name); | 80 $fullName = $this->getFullyQualifiedName($name); |
81 $inScope = isset($this->currentScope[strtolower($fullName)]); | 81 $inScope = isset($this->currentScope[strtolower($fullName)]); |
82 if (!$inScope && !function_exists($shortName) && !function_exists($fullName)) { | 82 if (!$inScope && !function_exists($shortName) && !function_exists($fullName)) { |
83 $message = sprintf('Call to undefined function %s()', $name); | 83 $message = sprintf('Call to undefined function %s()', $name); |
84 throw new FatalErrorException($message, 0, E_ERROR, null, $node->getLine()); | 84 throw new FatalErrorException($message, 0, E_ERROR, null, $node->getLine()); |
85 } | 85 } |
86 } | 86 } |