| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | abstract class ModelProxy extends BaseProxy |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Returns the real model class FQCN |
||
| 19 | * |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | public static function modelClass() |
||
| 23 | { |
||
| 24 | $instance = static::getInstance(); |
||
| 25 | |||
| 26 | return $instance->targetClass(); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritDoc |
||
| 31 | */ |
||
| 32 | protected function targetClass(): string |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Try guessing the associated contract class for actual proxy |
||
| 39 | * Depends on the concord convention the default pattern is |
||
| 40 | * 'UserProxy' -> entity = 'User' -> '../Contracts/User' |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | protected function guessContract() |
||
| 51 |