Code Duplication    Length = 11-11 lines in 2 locations

src/ResourceDocument.php 2 locations

@@ 201-211 (lines=11) @@
198
	 * @param RelationshipObject $relationshipObject
199
	 * @param array              $options            optional {@see ResourceDocument::$defaults}
200
	 */
201
	public function addRelationshipObject($key, RelationshipObject $relationshipObject, array $options=[]) {
202
		$this->ensureResourceObject();
203
		
204
		$options = array_merge(self::$defaults, $options);
205
		
206
		$this->resource->addRelationshipObject($key, $relationshipObject);
207
		
208
		if ($options['includeContainedResources']) {
209
			$this->addIncludedResourceObject(...$relationshipObject->getNestedContainedResourceObjects());
210
		}
211
	}
212
	
213
	/**
214
	 * set the RelationshipsObject to the resource
@@ 221-231 (lines=11) @@
218
	 * @param RelationshipsObject $relationshipsObject
219
	 * @param array               $options             optional {@see ResourceDocument::$defaults}
220
	 */
221
	public function setRelationshipsObject(RelationshipsObject $relationshipsObject, array $options=[]) {
222
		$this->ensureResourceObject();
223
		
224
		$options = array_merge(self::$defaults, $options);
225
		
226
		$this->resource->setRelationshipsObject($relationshipsObject);
227
		
228
		if ($options['includeContainedResources']) {
229
			$this->addIncludedResourceObject(...$relationshipsObject->getNestedContainedResourceObjects());
230
		}
231
	}
232
	
233
	/**
234
	 * spec api