| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0067 |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | 1 | private function getInterceptors(BindInterface $bind) : string |
|
| 52 | { |
||
| 53 | 1 | $bindings = $bind->getBindings(); |
|
| 54 | 1 | if (! $bindings) { |
|
|
|
|||
| 55 | return ''; |
||
| 56 | } |
||
| 57 | 1 | $log = ' (aop)'; |
|
| 58 | 1 | foreach ($bindings as $mehtod => $intepceptors) { |
|
| 59 | 1 | $log .= sprintf( |
|
| 60 | 1 | ' +%s(%s)', |
|
| 61 | 1 | $mehtod, |
|
| 62 | 1 | implode(', ', $intepceptors) |
|
| 63 | ); |
||
| 64 | } |
||
| 65 | |||
| 66 | 1 | return $log; |
|
| 67 | } |
||
| 68 | } |
||
| 69 |
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.