1 | <?php |
||
8 | class Slice |
||
9 | { |
||
10 | /** |
||
11 | * Slice a node from the tree and return a new tree structure where |
||
12 | * the children from this node get the parent of the extracted Node |
||
13 | * as their parent |
||
14 | * |
||
15 | * @param NodeCollection $nodeCollection |
||
16 | * @param Node[] $sliceNodes |
||
17 | * @return NodeCollection |
||
18 | */ |
||
19 | 24 | public function __invoke(NodeCollection $nodeCollection, Node ...$sliceNodes): NodeCollection |
|
37 | } |
||
38 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.