Skip to content

Commit

Permalink
Extend node instead of statement
Browse files Browse the repository at this point in the history
  • Loading branch information
genintho committed Dec 2, 2024
1 parent 6b74685 commit 55ea8e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/ast/propertyhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
*/
"use strict";

const Statement = require("./statement");
const Node = require("./node");
const KIND = "propertyhook";

/**
* Defines a class property hook getter & setter
*
* @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;
Expand Down
2 changes: 1 addition & 1 deletion types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 55ea8e5

Please sign in to comment.