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