| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | final class IntegerNormalizerBuilder implements IIntegerNormalizerBuilder |
||
| 16 | { |
||
| 17 | private ?int $divisor = null; |
||
| 18 | private ?int $min = null; |
||
| 19 | |||
| 20 | public function build(): IIntegerNormalizer |
||
| 21 | { |
||
| 22 | $this->validate(); |
||
| 23 | |||
| 24 | return new IntegerNormalizer( |
||
| 25 | $this->divisor, |
||
| 26 | $this->min, |
||
| 27 | ); |
||
| 28 | } |
||
| 29 | |||
| 30 | private function validate(): void |
||
| 31 | { |
||
| 32 | match (true) { |
||
| 33 | $this->divisor === null => throw new LogicException('Divisor value is not set.'), |
||
| 34 | $this->min === null => throw new LogicException('Min value is not set.'), |
||
| 35 | default => null, |
||
| 36 | }; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function withDivisor(int $divisor): IIntegerNormalizerBuilder |
||
| 44 | } |
||
| 45 | |||
| 46 | public function withMin(int $min): IIntegerNormalizerBuilder |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths