Conditions | 4 |
Paths | 6 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
70 | 1 | public function tick() |
|
71 | { |
||
72 | 1 | if (!empty($this->queuing)) { |
|
73 | 1 | $this->manager->addTask(array_shift($this->queuing)); |
|
|
|||
74 | 1 | } |
|
75 | |||
76 | 1 | if ($this->manager->tick()) { |
|
77 | 1 | return true; |
|
78 | } |
||
79 | |||
80 | 1 | if (empty($this->waiting)) { |
|
81 | 1 | return false; |
|
82 | } |
||
83 | |||
84 | 1 | $this->queuing = array_shift($this->waiting); |
|
85 | |||
86 | 1 | return true; |
|
87 | } |
||
88 | |||
102 |
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: