diff --git a/src/ast/propertyhook.js b/src/ast/propertyhook.js index a9628252..8ff8a4ea 100644 --- a/src/ast/propertyhook.js +++ b/src/ast/propertyhook.js @@ -5,7 +5,7 @@ */ "use strict"; -const Statement = require("./statement"); +const Node = require("./node"); const KIND = "propertyhook"; /** @@ -13,17 +13,17 @@ const KIND = "propertyhook"; * * @constructor PropertyHook * @memberOf module:php-parser - * @extends {Statement} + * @extends {Node} * @property {string} name * @property {Boolean} isFinal * @property {Boolean} byref * @property {Parameter|null} parameter * @property {Block|Statement} body */ -module.exports = Statement.extends( +module.exports = Node.extends( KIND, function PropertyHook(name, isFinal, byref, parameter, body, docs, location) { - Statement.apply(this, [KIND, docs, location]); + Node.apply(this, [KIND, docs, location]); this.name = name; this.byref = byref; this.parameter = parameter; diff --git a/types.d.ts b/types.d.ts index 4386c2b1..bc91586d 100644 --- a/types.d.ts +++ b/types.d.ts @@ -780,7 +780,7 @@ declare module "php-parser" { /** * Defines a class property hook getter & setter */ - class PropertyHook extends Statement { + class PropertyHook extends Node { name: string; isFinal: boolean; byref: boolean;