Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
57 | private function resolveFieldFromRelation() |
||
58 | { |
||
59 | if (false === $this->isRelationPopulated('fieldRecord')) { |
||
60 | return null; |
||
61 | } |
||
62 | |||
63 | /** @var FieldRecord $record */ |
||
64 | $record = $this->getRelation('fieldRecord'); |
||
65 | if (null === $record) { |
||
66 | return null; |
||
67 | } |
||
68 | |||
69 | return Craft::$app->getFields()->getFieldById($record->id); |
||
70 | } |
||
71 | |||
85 |