| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ProxyGenerator |
||
| 8 | { |
||
| 9 | /** @var Configuration */ |
||
| 10 | private $configuration; |
||
| 11 | /** @var AccessInterceptorValueHolderFactory */ |
||
| 12 | private $factory; |
||
| 13 | |||
| 14 | public function __construct(Configuration $configuration, ?AccessInterceptorValueHolderFactory $factory = null) |
||
| 15 | { |
||
| 16 | $this->configuration = $configuration; |
||
| 17 | $this->factory = $factory ?? new AccessInterceptorValueHolderFactory(); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function generate(object $object, array $methods = []): object |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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.