| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 61 | 3 | private function getQueue($command_name) |
|
| 62 | { |
||
| 63 | 3 | foreach ($this->queue_map as $queue => $commands) { |
|
| 64 | 3 | if (in_array($command_name, $commands)) { |
|
| 65 | 2 | return $queue; |
|
| 66 | } |
||
| 67 | 2 | } |
|
| 68 | |||
| 69 | 1 | throw new Exception( |
|
| 70 | 1 | sprintf('No queue has been set for the `%s` command', $command_name) |
|
| 71 | 1 | ); |
|
| 72 | } |
||
| 73 | } |
||
| 74 |
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: