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 AlecRabbit\Spinner\Core\Contract\ITolerance, 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
30
/** @scrutinizer ignore-type */ $this->tolerance,
Loading history...
31
);
32
}
33
34
private function validate(): void
35
{
36
match (true) {
37
$this->frames === null => throw new LogicException('Frame collection is not set.'),
38
$this->interval === null => throw new LogicException('Interval is not set.'),
39
$this->tolerance === null => throw new LogicException('Tolerance is not set.'),
40
default => null,
41
};
42
}
43
44
public function withFrameCollection(IFrameCollection $frames): IFrameRevolverBuilder
45
{
46
$clone = clone $this;
47
$clone->frames = $frames;
48
return $clone;
49
}
50
51
public function withInterval(IInterval $interval): IFrameRevolverBuilder
52
{
53
$clone = clone $this;
54
$clone->interval = $interval;
55
return $clone;
56
}
57
58
public function withTolerance(ITolerance $tolerance): IFrameRevolverBuilder