It seems like $this->frames can also be of type null; however, parameter $frameCollection of AlecRabbit\Spinner\Core\...Revolver::__construct() does only seem to accept AlecRabbit\Spinner\Core\Contract\IFrameCollection, 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->interval can also be of type null; however, parameter $interval of AlecRabbit\Spinner\Core\...Revolver::__construct() does only seem to accept AlecRabbit\Spinner\Contract\IInterval, 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->tolerance can also be of type null; however, parameter $tolerance of AlecRabbit\Spinner\Core\...Revolver::__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
28
/** @scrutinizer ignore-type */ $this->tolerance,
Loading history...
29
);
30
}
31
32
private function validate(): void
33
{
34
match (true) {
35
$this->frames === null => throw new LogicException('Frame collection is not set.'),
36
$this->interval === null => throw new LogicException('Interval is not set.'),
37
$this->tolerance === null => throw new LogicException('Tolerance is not set.'),
38
default => null,
39
};
40
}
41
42
public function withFrameCollection(IFrameCollection $frames): IFrameRevolverBuilder
43
{
44
$clone = clone $this;
45
$clone->frames = $frames;
46
return $clone;
47
}
48
49
public function withInterval(IInterval $interval): IFrameRevolverBuilder
50
{
51
$clone = clone $this;
52
$clone->interval = $interval;
53
return $clone;
54
}
55
56
public function withTolerance(int $tolerance): IFrameRevolverBuilder