/var/www/cobraambalaj/vendor/psy/psysh/src/CodeCleaner
NameSizeModeActions
AbstractClassPass.php22020644editdlrm
AssignThisVariablePass.php10350644editdlrm
CalledClassPass.php23870644editdlrm
CallTimePassByReferencePass.php13920644editdlrm
CodeCleanerPass.php4150644editdlrm
EmptyArrayDimFetchPass.php12830644editdlrm
ExitPass.php7730644editdlrm
FinalClassPass.php16670644editdlrm
FunctionContextPass.php13400644editdlrm
FunctionReturnInWriteContextPass.php25010644editdlrm
ImplicitReturnPass.php42400644editdlrm
InstanceOfPass.php18780644editdlrm
IssetPass.php13220644editdlrm
LabelContextPass.php23570644editdlrm
LeavePsyshAlonePass.php9130644editdlrm
ListPass.php32830644editdlrm
LoopContextPass.php34800644editdlrm
MagicConstantsPass.php10680644editdlrm
NamespaceAwarePass.php18530644editdlrm
NamespacePass.php24160644editdlrm
NoReturnValue.php8700644editdlrm
PassableByReferencePass.php40260644editdlrm
RequirePass.php45650644editdlrm
ReturnTypePass.php34650644editdlrm
StrictTypesPass.php27060644editdlrm
UseStatementPass.php43360644editdlrm
ValidClassNamePass.php124330644editdlrm
ValidConstantPass.php32030644editdlrm
ValidConstructorPass.php38860644editdlrm
ValidFunctionNamePass.php32380644editdlrm
Edit: /var/www/cobraambalaj/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php (3203B)
name->parts) > 1) { $name = $this->getFullyQualifiedName($node->name); if (!\defined($name)) { $msg = \sprintf('Undefined constant %s', $name); throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); } } elseif ($node instanceof ClassConstFetch) { $this->validateClassConstFetchExpression($node); } } /** * Validate a class constant fetch expression. * * @throws FatalErrorException if a class constant is not defined * * @param ClassConstFetch $stmt */ protected function validateClassConstFetchExpression(ClassConstFetch $stmt) { // For PHP Parser 4.x $constName = $stmt->name instanceof Identifier ? $stmt->name->toString() : $stmt->name; // give the `class` pseudo-constant a pass if ($constName === 'class') { return; } // if class name is an expression, give it a pass for now if (!$stmt->class instanceof Expr) { $className = $this->getFullyQualifiedName($stmt->class); // if the class doesn't exist, don't throw an exception… it might be // defined in the same line it's used or something stupid like that. if (\class_exists($className) || \interface_exists($className)) { $refl = new \ReflectionClass($className); if (!$refl->hasConstant($constName)) { $constType = \class_exists($className) ? 'Class' : 'Interface'; $msg = \sprintf('%s constant \'%s::%s\' not found', $constType, $className, $constName); throw new FatalErrorException($msg, 0, \E_ERROR, null, $stmt->getLine()); } } } } }