Conditions | 5 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 6 |
Ratio | 30 % |
Changes | 0 |
1 | <?php |
||
22 | string $viewType, |
||
23 | array $viewOptions |
||
24 | ) { |
||
25 | $this->template = $template; |
||
26 | $this->factory = $factory; |
||
27 | $this->collection = $collection; |
||
28 | $this->viewType = $viewType; |
||
29 | $this->viewOptions = $viewOptions; |
||
30 | } |
||
31 | |||
32 | public function getTemplate(): string |
||
33 | { |
||
34 | return $this->template; |
||
35 | } |
||
36 | |||
37 | public function current() |
||
38 | { |
||
39 | return $this->factory->create( |
||
40 | $this->viewType, |
||
41 | current($this->collection), |
||
42 | $this->viewOptions |
||
66 |