Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function _before() |
||
15 | { |
||
16 | if (!class_exists('Lurker\\ResourceWatcher')) { |
||
17 | $this->resourceWatcher = test::spec( |
||
18 | 'Lurker\ResourceWatcher', |
||
19 | [ |
||
20 | 'start' => true, |
||
21 | 'track' => true, |
||
22 | 'addListener' => true |
||
23 | ] |
||
24 | )->make(); |
||
25 | } else { |
||
26 | $this->resourceWatcher = test::double( |
||
27 | 'Lurker\ResourceWatcher', |
||
28 | [ |
||
29 | 'start' => true, |
||
30 | 'track' => true, |
||
31 | 'addListener' => true |
||
32 | ] |
||
33 | ); |
||
34 | } |
||
35 | } |
||
36 | |||
70 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: