It seems like $this->divisor can also be of type null; however, parameter $divisor of AlecRabbit\Spinner\Core\...rmalizer::__construct() does only seem to accept integer, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
It seems like $this->min can also be of type null; however, parameter $min of AlecRabbit\Spinner\Core\...rmalizer::__construct() does only seem to accept integer, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
24
/** @scrutinizer ignore-type */ $this->min,
Loading history...
25
);
26
}
27
28
private function validate(): void
29
{
30
match (true) {
31
null === $this->divisor => throw new LogicException('Divisor value is not set.'),
32
$this->min === null => throw new LogicException('Min value is not set.'),
33
default => null,
34
};
35
}
36
37
public function withDivisor(int $divisor): IIntegerNormalizerBuilder
38
{
39
$clone = clone $this;
40
$clone->divisor = $divisor;
41
return $clone;
42
}
43
44
public function withMin(int $min): IIntegerNormalizerBuilder