| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | abstract class AbstractProvider implements ProviderInterface |
||
| 27 | { |
||
| 28 | protected string $identifier; |
||
| 29 | protected string $label; |
||
| 30 | |||
| 31 | public function __invoke(array $attributes): self |
||
| 32 | { |
||
| 33 | if (!($attributes['label'] ?? false)) { |
||
| 34 | throw new \RuntimeException('Attribute \'label\' must be set to use ' . __CLASS__, 1606478090); |
||
| 35 | } |
||
| 36 | |||
| 37 | $this->identifier = $attributes['identifier']; |
||
| 38 | $this->label = $attributes['label']; |
||
| 39 | return $this; |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getIdentifier(): string |
||
| 43 | { |
||
| 44 | return $this->identifier; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getLabel(): string |
||
| 50 | } |
||
| 51 | |||
| 52 | protected function getLanguageService(): LanguageService |
||
| 55 | } |
||
| 56 | } |
||
| 57 |