| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | trait IdentifiesEloquentModels |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Return whether the specified class name is an Eloquent Model. |
||
| 11 | * |
||
| 12 | * @param mixed $value |
||
| 13 | * |
||
| 14 | * @return bool |
||
| 15 | */ |
||
| 16 | protected function isModel($value): bool |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Returns an array containing the Model class name, and the model id. |
||
| 23 | * The id is null if $model is a string. |
||
| 24 | * |
||
| 25 | * @param Model|string $model |
||
| 26 | * |
||
| 27 | * @return array |
||
| 28 | */ |
||
| 29 | protected function getModelClassNameAndId($model): array |
||
| 44 |