1 | <?php |
||
11 | class Traverser |
||
12 | { |
||
13 | /** @var Parser */ |
||
14 | private $parser; |
||
15 | |||
16 | public function __construct(Parser $parser = null) |
||
20 | |||
21 | public function traverseFilename(string $filename, NodeVisitor ...$visitors) |
||
25 | |||
26 | public function traverseClonedNodes(array $nodes, NodeVisitor ...$visitors) |
||
30 | |||
31 | private function parseNodes(string $filename) |
||
35 | |||
36 | private function cloneNodes(array $nodes) |
||
40 | |||
41 | private function makeTraverser(NodeVisitor ...$visitors): NodeTraverser |
||
50 | } |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.