1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\Node; |
4: | |
5: | use PhpParser\Node\Stmt\ClassMethod as PhpParserClassMethod; |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | class ClassMethod extends PhpParserClassMethod |
12: | { |
13: | |
14: | public function __construct( |
15: | \PhpParser\Node\Stmt\ClassMethod $node, |
16: | private bool $isDeclaredInTrait, |
17: | ) |
18: | { |
19: | parent::__construct($node->name, [ |
20: | 'flags' => $node->flags, |
21: | 'byRef' => $node->byRef, |
22: | 'params' => $node->params, |
23: | 'returnType' => $node->returnType, |
24: | 'stmts' => $node->stmts, |
25: | 'attrGroups' => $node->attrGroups, |
26: | ], $node->attributes); |
27: | } |
28: | |
29: | public function getNode(): PhpParserClassMethod |
30: | { |
31: | return $this; |
32: | } |
33: | |
34: | public function isDeclaredInTrait(): bool |
35: | { |
36: | return $this->isDeclaredInTrait; |
37: | } |
38: | |
39: | } |
40: | |