1 | <?php |
||
12 | class ParsingContext |
||
13 | { |
||
14 | protected $parser; |
||
15 | protected $traverser; |
||
16 | protected $index; |
||
17 | |||
18 | protected $file; |
||
19 | protected $errors = []; |
||
20 | |||
21 | protected $namespace; |
||
22 | protected $aliases = []; |
||
23 | protected $reflection; |
||
24 | protected $functionLike; |
||
25 | |||
26 | 1128 | public function __construct(ParserInterface $parser, NodeTraverserInterface $traverser, ReflectionsIndex $index) |
|
34 | |||
35 | 1128 | public function parseFile($file) |
|
50 | |||
51 | 1128 | public function getFilePath() |
|
55 | |||
56 | 1128 | public function getFileContent() |
|
64 | |||
65 | /** |
||
66 | * @param string $name |
||
67 | */ |
||
68 | 258 | public function addAlias($alias, $name) |
|
72 | |||
73 | 1101 | public function getAliases() |
|
77 | |||
78 | /** |
||
79 | * @param string $namespace |
||
80 | */ |
||
81 | 1047 | public function enterNamespace($namespace) |
|
88 | |||
89 | 1047 | public function leaveNamespace() |
|
96 | |||
97 | 6 | public function getNamespace() |
|
101 | |||
102 | 1101 | public function enterReflection(Reflection $reflection) |
|
106 | |||
107 | 1104 | public function leaveReflection() |
|
117 | |||
118 | 1101 | public function enterFunctionLike(ReflectionFunctionAbstract $reflection) |
|
122 | |||
123 | 1104 | public function getFunctionLike() |
|
127 | |||
128 | 1104 | public function leaveFunctionLike() |
|
132 | |||
133 | 1104 | public function getReflection() |
|
137 | |||
138 | 6 | public function addErrors($name, $line, array $errors) |
|
144 | |||
145 | 33 | public function addError($name, $line, $error) |
|
149 | |||
150 | 18 | public function getErrors() |
|
154 | } |
||
155 |
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.