Conditions | 4 |
Paths | 3 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
53 | protected function resolveId() |
||
54 | { |
||
55 | $fieldId = $this->getFieldId(); |
||
56 | $elementId = $this->getElementId(); |
||
57 | |||
58 | if (null === $fieldId || null === $elementId) { |
||
59 | return null; |
||
60 | } |
||
61 | |||
62 | if (!$objectId = ObjectAssociation::find() |
||
63 | ->select(['objectId']) |
||
64 | ->field($fieldId) |
||
65 | ->element($elementId) |
||
66 | ->siteId(SiteHelper::ensureSiteId($this->getSiteId())) |
||
67 | ->scalar()) { |
||
68 | return null; |
||
69 | } |
||
70 | |||
71 | return (string)$objectId; |
||
72 | } |
||
73 | } |
||
74 |