| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0067 |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | 1 | private function getInterceptors(BindInterface $bind) : string |
|
| 57 | { |
||
| 58 | 1 | $bindings = $bind->getBindings(); |
|
| 59 | 1 | if (! $bindings) { |
|
|
|
|||
| 60 | return ''; |
||
| 61 | } |
||
| 62 | 1 | $log = ' (aop)'; |
|
| 63 | 1 | foreach ($bindings as $mehtod => $intepceptors) { |
|
| 64 | 1 | $log .= sprintf( |
|
| 65 | 1 | ' +%s(%s)', |
|
| 66 | 1 | $mehtod, |
|
| 67 | 1 | implode(', ', $intepceptors) |
|
| 68 | ); |
||
| 69 | } |
||
| 70 | |||
| 71 | 1 | return $log; |
|
| 72 | } |
||
| 73 | } |
||
| 74 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.