Conditions | 3 |
Paths | 4 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
39 | public function run( |
||
40 | string $field, |
||
41 | string $element, |
||
42 | string $objectId, |
||
43 | int $siteId = null |
||
44 | ) { |
||
45 | |||
46 | $field = $this->resolveField($field); |
||
47 | $element = $this->resolveElement($element); |
||
48 | |||
49 | $query = $field->normalizeValue($objectId, $element); |
||
50 | |||
51 | if (null !== $siteId) { |
||
52 | $query->siteId($siteId); |
||
53 | } |
||
54 | |||
55 | if (null === ($association = $query->one())) { |
||
56 | return $this->handleSuccessResponse(true); |
||
57 | } |
||
58 | |||
59 | return $this->runInternal($association); |
||
60 | } |
||
61 | |||
73 |