Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function testMocking() |
||
30 | { |
||
31 | foreach ($this->mocks as [$job, $params, $value]) { |
||
32 | if (is_string($value) || is_callable($value)) { |
||
|
|||
33 | continue; |
||
34 | } |
||
35 | $result = $this->dispatch($job, $params); |
||
36 | $this->assertSame(get_object_vars($result), $value); |
||
37 | } |
||
38 | |||
39 | |||
40 | $this->expectExceptionMessage("Remote calls (remote.call) are disabled for tests"); |
||
41 | $this->dispatch('remote.call'); |
||
42 | } |
||
43 | } |
||
44 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.