| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 560 | public function build(string $context): Configuration |
|
| 34 | { |
||
| 35 | try { |
||
| 36 | 560 | $class = join('\\', [__NAMESPACE__, ucfirst($context) . 'Configuration']); |
|
| 37 | 560 | return new $class($this->toArray()); |
|
| 38 | // @codeCoverageIgnoreStart |
||
| 39 | } catch (CacheException $e) { |
||
| 40 | throw $e; |
||
| 41 | // @codeCoverageIgnoreEnd |
||
| 42 | 125 | } catch (Throwable) { |
|
| 43 | 125 | return new class($this->toArray()) extends CacheConfiguration {}; |
|
| 44 | } |
||
| 47 |
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.