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['linkType']) { |
||
15 | case 'Entry': |
||
16 | $stubPath = __DIR__ . '/stubs/entry.stub'; |
||
17 | break; |
||
18 | case 'Asset': |
||
19 | $stubPath = __DIR__ . '/stubs/asset.stub'; |
||
20 | break; |
||
21 | default: |
||
22 | throw new Exception('Unknown Link items type "' . $this->field['linkType'] . '"'); |
||
23 | } |
||
24 | |||
25 | return self::getStub($stubPath, [ |
||
26 | 'field' => $this->id(), |
||
27 | 'field_studly' => $this->studlyId(), |
||
28 | ]); |
||
52 |