| Total Complexity | 7 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 35.29% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class FieldView implements View |
||
| 10 | { |
||
| 11 | private string $fieldName; |
||
| 12 | private string $template; |
||
| 13 | private array $options; |
||
| 14 | private ?\Closure $dataTransformer; |
||
| 15 | |||
| 16 | public function __construct( |
||
| 17 | 2 | string $fieldName, |
|
| 18 | string $template, |
||
| 19 | array $options = [], |
||
| 20 | ?\Closure $dataTransformer = null |
||
| 21 | ) { |
||
| 22 | $this->fieldName = $fieldName; |
||
| 23 | 2 | $this->template = $template; |
|
| 24 | 2 | $this->options = $options; |
|
| 25 | 2 | $this->dataTransformer = $dataTransformer; |
|
| 26 | 2 | } |
|
| 27 | 2 | ||
| 28 | public function getName(): string |
||
| 29 | { |
||
| 30 | return $this->fieldName; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getOptions(): array |
||
| 34 | { |
||
| 35 | return $this->options; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getOption(string $name) |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getTemplate(): string |
||
| 50 | } |
||
| 51 | |||
| 52 | public function getDataTransformer(): ?\Closure |
||
| 55 | } |
||
| 56 | } |
||
| 57 |