| Conditions | 1 |
| Paths | 1 |
| Total Lines | 6 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | 10 | public function __construct($path = null, $host = null, $methods = [], $schemes = []) |
|
| 46 | { |
||
| 47 | 10 | $this->path = $path; |
|
| 48 | 10 | $this->host = $host; |
|
| 49 | 10 | $this->methods = array_map('strtoupper', (array) $methods); |
|
| 50 | 10 | $this->schemes = array_map('strtolower', (array) $schemes); |
|
| 51 | 10 | } |
|
| 79 |
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.