| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | abstract class StaticSchema extends Schema |
||
| 12 | { |
||
| 13 | /** @var string The model class for models associated to the records */ |
||
| 14 | protected static $model = ''; |
||
| 15 | |||
| 16 | /** @var string The name of the table for the schema */ |
||
| 17 | protected static $table = ''; |
||
| 18 | |||
| 19 | /** @var string[]|string The primary key field or list of fields the make up the composite primary key */ |
||
| 20 | protected static $primaryKey = []; |
||
| 21 | |||
| 22 | /** @var string[] List of all the fields in the table */ |
||
| 23 | protected static $fields = []; |
||
| 24 | |||
| 25 | /** @var array[] The relationship definitions for the schema */ |
||
| 26 | protected static $relationships = []; |
||
| 27 | |||
| 28 | 20 | public function getModel(): string |
|
| 29 | { |
||
| 30 | 20 | return static::$model; |
|
| 31 | } |
||
| 32 | |||
| 33 | 30 | public function getTable(): string |
|
| 36 | } |
||
| 37 | |||
| 38 | 51 | public function getPrimaryKey(): array |
|
| 39 | { |
||
| 40 | 51 | return \is_array(static::$primaryKey) ? static::$primaryKey : [static::$primaryKey]; |
|
| 41 | } |
||
| 42 | |||
| 43 | 59 | public function getFields(): array |
|
| 46 | } |
||
| 47 | |||
| 48 | 35 | public function getRelationshipDefinitions(): array |
|
| 51 | } |
||
| 52 | } |
||
| 53 |