Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | final class StyleFrameRevolverFactory implements IStyleFrameRevolverFactory |
||
16 | { |
||
17 | public function __construct( |
||
18 | protected IFrameRevolverBuilder $frameRevolverBuilder, |
||
19 | protected IFrameCollectionFactory $frameCollectionFactory, |
||
20 | protected IRevolverConfig $revolverConfig, |
||
21 | ) { |
||
22 | } |
||
23 | |||
24 | public function create(IPattern $pattern): IFrameRevolver |
||
25 | { |
||
26 | return $this->frameRevolverBuilder |
||
27 | ->withFrameCollection( |
||
28 | $this->frameCollectionFactory->create( |
||
29 | $pattern->getFrames() |
||
30 | ) |
||
31 | ) |
||
32 | ->withInterval( |
||
33 | $pattern->getInterval() |
||
34 | ) |
||
35 | ->withTolerance( |
||
36 | $this->getTolerance() |
||
37 | ) |
||
38 | ->build() |
||
39 | ; |
||
40 | } |
||
41 | |||
42 | private function getTolerance(): ITolerance |
||
45 | } |
||
46 | } |
||
47 |