Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
17 | class EnumProxy extends BaseProxy |
||
18 | { |
||
19 | /** |
||
20 | * Returns the real enum class FQCN |
||
21 | * |
||
22 | * @return string |
||
23 | */ |
||
24 | public static function enumClass() |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @inheritDoc |
||
33 | */ |
||
34 | protected function targetClass(): string |
||
35 | { |
||
36 | return $this->concord->enum($this->contract); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Tries guessing the associated contract class for an actual proxy class |
||
41 | * Depending on the convention used by concord, the default pattern is |
||
42 | * 'UserTypeProxy' -> enum == 'UserType' -> '../Contracts/UserType' |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | protected function guessContract() |
||
50 | ); |
||
51 | } |
||
53 |