Code Duplication    Length = 13-13 lines in 2 locations

eZ/Publish/Core/REST/Client/LocationService.php 2 locations

@@ 227-239 (lines=13) @@
224
     *
225
     * @return \eZ\Publish\API\Repository\Values\Content\Location[]
226
     */
227
    public function loadLocations(ContentInfo $contentInfo, Location $rootLocation = null, array $prioritizedLanguages = null)
228
    {
229
        $values = $this->requestParser->parse('object', $contentInfo->id);
230
        $response = $this->client->request(
231
            'GET',
232
            $this->requestParser->generate('objectLocations', array('object' => $values['object'])),
233
            new Message(
234
                array('Accept' => $this->outputVisitor->getMediaType('LocationList'))
235
            )
236
        );
237
238
        return $this->inputDispatcher->parse($response);
239
    }
240
241
    /**
242
     * Loads children which are readable by the current user of a location object sorted by sortField and sortOrder.
@@ 251-263 (lines=13) @@
248
     *
249
     * @return \eZ\Publish\API\Repository\Values\Content\LocationList
250
     */
251
    public function loadLocationChildren(Location $location, $offset = 0, $limit = 25, array $prioritizedLanguages = null)
252
    {
253
        $values = $this->requestParser->parse('location', $location->id);
254
        $response = $this->client->request(
255
            'GET',
256
            $this->requestParser->generate('locationChildren', array('location' => $values['location'])),
257
            new Message(
258
                array('Accept' => $this->outputVisitor->getMediaType('LocationList'))
259
            )
260
        );
261
262
        return $this->inputDispatcher->parse($response);
263
    }
264
265
    /**
266
     * Load parent Locations for Content Draft.