Total Complexity | 5 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class Consumer |
||
22 | { |
||
23 | /** |
||
24 | * @var AbstractQueue |
||
25 | */ |
||
26 | protected $queue; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $callbacks = []; |
||
32 | |||
33 | /** |
||
34 | * @param QueueInterface $queue |
||
35 | */ |
||
36 | public function __construct(QueueInterface $queue) |
||
37 | { |
||
38 | $this->queue = $queue; |
||
|
|||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param $callable |
||
43 | */ |
||
44 | public function addCallback($callable) |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param callable $stream |
||
51 | * @throws \ErrorException |
||
52 | */ |
||
53 | public function work(callable $stream) |
||
88 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.