/home/techb158/ileadtechnology.com/SSM/vendor/psy/psysh/src/CodeCleaner
NameSizeModeActions
AbstractClassPass.php22000644editdlrm
AssignThisVariablePass.php10340644editdlrm
CalledClassPass.php23860644editdlrm
CallTimePassByReferencePass.php13910644editdlrm
CodeCleanerPass.php4150644editdlrm
EmptyArrayDimFetchPass.php12830644editdlrm
ExitPass.php7730644editdlrm
FinalClassPass.php16660644editdlrm
FunctionContextPass.php13390644editdlrm
FunctionReturnInWriteContextPass.php24980644editdlrm
ImplicitReturnPass.php42400644editdlrm
InstanceOfPass.php16040644editdlrm
LabelContextPass.php23560644editdlrm
LeavePsyshAlonePass.php9130644editdlrm
ListPass.php32820644editdlrm
LoopContextPass.php34760644editdlrm
MagicConstantsPass.php10680644editdlrm
NamespaceAwarePass.php18560644editdlrm
NamespacePass.php24160644editdlrm
NoReturnValue.php8700644editdlrm
PassableByReferencePass.php40240644editdlrm
RequirePass.php30350644editdlrm
StrictTypesPass.php27040644editdlrm
UseStatementPass.php43560644editdlrm
ValidClassNamePass.php121760644editdlrm
ValidConstantPass.php32020644editdlrm
ValidConstructorPass.php38840644editdlrm
ValidFunctionNamePass.php32390644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php (2386B)
inClass = false; } /** * @throws ErrorException if get_class or get_called_class is called without an object from outside a class * * @param Node $node */ public function enterNode(Node $node) { if ($node instanceof Class_ || $node instanceof Trait_) { $this->inClass = true; } elseif ($node instanceof FuncCall && !$this->inClass) { // We'll give any args at all (besides null) a pass. // Technically we should be checking whether the args are objects, but this will do for now. // // @todo switch this to actually validate args when we get context-aware code cleaner passes. if (!empty($node->args) && !$this->isNull($node->args[0])) { return; } // We'll ignore name expressions as well (things like `$foo()`) if (!($node->name instanceof Name)) { return; } $name = \strtolower($node->name); if (\in_array($name, ['get_class', 'get_called_class'])) { $msg = \sprintf('%s() called without object from outside a class', $name); throw new ErrorException($msg, 0, E_USER_WARNING, null, $node->getLine()); } } } /** * @param Node $node */ public function leaveNode(Node $node) { if ($node instanceof Class_) { $this->inClass = false; } } private function isNull(Node $node) { return $node->value instanceof ConstFetch && \strtolower($node->value->name) === 'null'; } }