Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
34 | public function modelProperty() |
||
35 | { |
||
36 | $property = ' * @property '; |
||
37 | |||
38 | switch ($this->field['items']['type']) { |
||
39 | case 'Link': |
||
40 | $property .= '\Illuminate\Support\Collection'; |
||
41 | break; |
||
42 | case 'Symbol': |
||
43 | $property .= 'string'; |
||
44 | break; |
||
45 | default: |
||
46 | throw new Exception('Unknown Array items type "' . $this->field['items']['type'] . '"'); |
||
47 | } |
||
48 | |||
49 | return $property . ' $' . $this->snakeId(); |
||
50 | } |
||
52 |