| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | abstract class Grantable extends Model |
||
| 15 | { |
||
| 16 | 83 | public function __construct(array $attributes = []) |
|
| 17 | { |
||
| 18 | 83 | $this->setTable($this->getConfigTableName()); |
|
| 19 | 83 | parent::__construct($attributes); |
|
| 20 | 83 | } |
|
| 21 | |||
| 22 | abstract protected function getConfigTableName(): string; |
||
| 23 | |||
| 24 | 83 | public function getFillable() |
|
| 25 | { |
||
| 26 | return [ |
||
| 27 | 83 | 'secret_name', |
|
| 28 | 'display_name', |
||
| 29 | 'description' |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 33 | 9 | public function __toString() |
|
| 36 | } |
||
| 37 | |||
| 38 | 2 | protected function serializeDate(\DateTimeInterface $date): string |
|
| 43 |