{"record":{"id":"e5fb03855c51dec0","repo":"nikic/PHP-Parser","slug":"unknown-property-hook-name","errorCode":null,"errorMessage":"Unknown property hook \"{name}\"","messagePattern":"Unknown property hook \"(.+?)\"","errorType":"exception","errorClass":"\\LogicException","httpStatus":null,"severity":"error","filePath":"lib/PhpParser/Node/PropertyHook.php","lineNumber":89,"sourceCode":"    }\n\n    public function getStmts(): ?array {\n        if ($this->body instanceof Expr) {\n            $name = $this->name->toLowerString();\n            if ($name === 'get') {\n                return [new Return_($this->body)];\n            }\n            if ($name === 'set') {\n                if (!$this->hasAttribute('propertyName')) {\n                    throw new \\LogicException(\n                        'Can only use getStmts() on a \"set\" hook if the \"propertyName\" attribute is set');\n                }\n\n                $propName = $this->getAttribute('propertyName');\n                $prop = new PropertyFetch(new Variable('this'), (string) $propName);\n                return [new Expression(new Assign($prop, $this->body))];\n            }\n            throw new \\LogicException('Unknown property hook \"' . $name . '\"');\n        }\n        return $this->body;\n    }\n\n    public function getAttrGroups(): array {\n        return $this->attrGroups;\n    }\n\n    public function getType(): string {\n        return 'PropertyHook';\n    }\n\n    public function getSubNodeNames(): array {\n        return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'body'];\n    }\n}\n","sourceCodeStart":71,"sourceCodeEnd":106,"githubUrl":"https://github.com/nikic/PHP-Parser/blob/fbd47f7ebcbb450138d92642a0a53b72a5285dda/lib/PhpParser/Node/PropertyHook.php#L71-L106","documentation":"Error \"Unknown property hook \"{name}\"\" thrown in nikic/PHP-Parser.","triggerScenarios":"Thrown at lib/PhpParser/Node/PropertyHook.php:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fbd47f7ebcbb450138d92642a0a53b72a5285dda","analyzedAt":"2026-08-17T03:58:32.123Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}