/var/www/vhosts/ihelp.ro/httpdocs/vendor/nikic/php-parser/lib/PhpParser
NameSizeModeActions
Builder/-0755rm
Comment/-0755rm
ErrorHandler/-0755rm
Internal/-0755rm
Lexer/-0755rm
Node/-0755rm
NodeVisitor/-0755rm
Parser/-0755rm
PrettyPrinter/-0755rm
Builder.php2030644editdlrm
BuilderFactory.php111150644editdlrm
BuilderHelpers.php97650644editdlrm
Comment.php75460644editdlrm
ConstExprEvaluationException.php860644editdlrm
ConstExprEvaluator.php92700644editdlrm
Error.php50420644editdlrm
ErrorHandler.php2940644editdlrm
JsonDecoder.php33750644editdlrm
Lexer.php240790644editdlrm
NameContext.php99230644editdlrm
Node.php39750644editdlrm
NodeAbstract.php51480644editdlrm
NodeDumper.php68510644editdlrm
NodeFinder.php24520644editdlrm
NodeTraverser.php105920644editdlrm
NodeTraverserInterface.php6290644editdlrm
NodeVisitor.php20260644editdlrm
NodeVisitorAbstract.php4380644editdlrm
Parser.php6280644editdlrm
ParserAbstract.php422140644editdlrm
ParserFactory.php16140644editdlrm
PrettyPrinterAbstract.php639710644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php (3375B)
decodeRecursive($value); } private function decodeRecursive($value) { if (\is_array($value)) { if (isset($value['nodeType'])) { if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') { return $this->decodeComment($value); } return $this->decodeNode($value); } return $this->decodeArray($value); } return $value; } private function decodeArray(array $array) : array { $decodedArray = []; foreach ($array as $key => $value) { $decodedArray[$key] = $this->decodeRecursive($value); } return $decodedArray; } private function decodeNode(array $value) : Node { $nodeType = $value['nodeType']; if (!\is_string($nodeType)) { throw new \RuntimeException('Node type must be a string'); } $reflectionClass = $this->reflectionClassFromNodeType($nodeType); /** @var Node $node */ $node = $reflectionClass->newInstanceWithoutConstructor(); if (isset($value['attributes'])) { if (!\is_array($value['attributes'])) { throw new \RuntimeException('Attributes must be an array'); } $node->setAttributes($this->decodeArray($value['attributes'])); } foreach ($value as $name => $subNode) { if ($name === 'nodeType' || $name === 'attributes') { continue; } $node->$name = $this->decodeRecursive($subNode); } return $node; } private function decodeComment(array $value) : Comment { $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; if (!isset($value['text'])) { throw new \RuntimeException('Comment must have text'); } return new $className( $value['text'], $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1 ); } private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass { if (!isset($this->reflectionClassCache[$nodeType])) { $className = $this->classNameFromNodeType($nodeType); $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); } return $this->reflectionClassCache[$nodeType]; } private function classNameFromNodeType(string $nodeType) : string { $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); if (class_exists($className)) { return $className; } $className .= '_'; if (class_exists($className)) { return $className; } throw new \RuntimeException("Unknown node type \"$nodeType\""); } }