| Total Complexity | 8 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | abstract class BaseTemplate implements SettingsTemplate |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @deprecated |
||
| 12 | * @codeCoverageIgnore |
||
| 13 | */ |
||
| 14 | public static function retreive(?string $modelClass = null): PageSettingsCollection |
||
| 15 | { |
||
| 16 | return static::retrieve($modelClass); |
||
| 17 | } |
||
| 18 | |||
| 19 | 1 | public static function retrieve(?string $modelClass = null): PageSettingsCollection |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | public static function viewData(array $options = []): array |
|
| 31 | } |
||
| 32 | |||
| 33 | 2 | public static function getSlug(): string |
|
| 34 | { |
||
| 35 | 2 | return Str::slug(static::getName()); |
|
| 36 | } |
||
| 37 | |||
| 38 | 4 | public static function getName(): string |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | public function mutateAttribute($key, $value) |
|
| 44 | { |
||
| 45 | 1 | $methodName = 'get' . Str::studly($key) . 'Attribute'; |
|
| 46 | |||
| 47 | 1 | if (method_exists($this, $methodName)) { |
|
| 48 | 1 | return $this->$methodName($value); |
|
| 49 | } |
||
| 50 | |||
| 51 | 1 | return $value; |
|
| 52 | } |
||
| 53 | |||
| 54 | 2 | public function templateKey(string $key): string |
|
| 57 | } |
||
| 58 | } |
||
| 59 |