| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function modelGetter() |
||
| 13 | { |
||
| 14 | switch ($this->field['items']['type']) { |
||
| 15 | case 'Link': |
||
| 16 | $stubPath = __DIR__ . '/stubs/entries.stub'; |
||
| 17 | break; |
||
| 18 | case 'Symbol': |
||
| 19 | $stubPath = __DIR__ . '/stubs/string.stub'; |
||
| 20 | break; |
||
| 21 | default: |
||
| 22 | throw new Exception('Unknown Array items type "' . $this->field['items']['type'] . '"'); |
||
| 23 | } |
||
| 24 | |||
| 25 | return self::getStub($stubPath, [ |
||
| 26 | 'field' => $this->id(), |
||
| 27 | 'field_studly' => $this->studlyId(), |
||
| 28 | ]); |
||
| 52 |