| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 8 | public function __construct( |
|
| 36 | StrategyEnum $strategy, |
||
| 37 | array $voters, |
||
| 38 | $actions = null, |
||
| 39 | $subjectClassName = null, |
||
| 40 | $contextClassName = null |
||
| 41 | ) { |
||
| 42 | 8 | parent::__construct($strategy, $voters); |
|
| 43 | |||
| 44 | 8 | $this->actionList = (array) $actions; |
|
| 45 | 8 | $this->subjectClassName = $subjectClassName; |
|
| 46 | 8 | $this->contextClassName = $contextClassName; |
|
| 47 | 8 | } |
|
| 48 | |||
| 73 |
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.