@@ 109-112 (lines=4) @@ | ||
106 | $relationship = []; |
|
107 | if (is_array($items)) { |
|
108 | foreach ($items as $item) { |
|
109 | if ($item instanceof ResourceIdentifierInterface) { |
|
110 | $this->checkIdentification($item); |
|
111 | $relationship[] = ['id' => $item->getId(), 'type' => $item->getType()]; |
|
112 | } |
|
113 | } |
|
114 | } elseif ($items instanceof ResourceIdentifierInterface) { |
|
115 | $this->checkIdentification($items); |
|
@@ 114-117 (lines=4) @@ | ||
111 | $relationship[] = ['id' => $item->getId(), 'type' => $item->getType()]; |
|
112 | } |
|
113 | } |
|
114 | } elseif ($items instanceof ResourceIdentifierInterface) { |
|
115 | $this->checkIdentification($items); |
|
116 | $relationship = ['id' => $items->getId(), 'type' => $items->getType()]; |
|
117 | } |
|
118 | ||
119 | if (!empty($relationship)) { |
|
120 | $data['relationships'][$name]['data'] = $relationship; |