Code Duplication    Length = 13-13 lines in 3 locations

eZ/Publish/Core/REST/Client/LocationService.php 1 location

@@ 241-253 (lines=13) @@
238
     *
239
     * @return \eZ\Publish\API\Repository\Values\Content\LocationList
240
     */
241
    public function loadLocationChildren(Location $location, $offset = 0, $limit = 25, array $prioritizedLanguages = null)
242
    {
243
        $values = $this->requestParser->parse('location', $location->id);
244
        $response = $this->client->request(
245
            'GET',
246
            $this->requestParser->generate('locationChildren', ['location' => $values['location']]),
247
            new Message(
248
                ['Accept' => $this->outputVisitor->getMediaType('LocationList')]
249
            )
250
        );
251
252
        return $this->inputDispatcher->parse($response);
253
    }
254
255
    /**
256
     * Load parent Locations for Content Draft.

eZ/Publish/Core/REST/Client/ObjectStateService.php 1 location

@@ 129-141 (lines=13) @@
126
    /**
127
     * {@inheritdoc}
128
     */
129
    public function loadObjectStates(ObjectStateGroup $objectStateGroup, array $prioritizedLanguages = [])
130
    {
131
        $values = $this->requestParser->parse('objectstategroup', $objectStateGroup->id);
132
        $response = $this->client->request(
133
            'GET',
134
            $this->requestParser->generate('objectstates', array('objectstategroup' => $values['objectstategroup'])),
135
            new Message(
136
                array('Accept' => $this->outputVisitor->getMediaType('ObjectStateList'))
137
            )
138
        );
139
140
        return $this->inputDispatcher->parse($response);
141
    }
142
143
    /**
144
     * Updates an object state group.

eZ/Publish/Core/REST/Client/RoleService.php 1 location

@@ 595-607 (lines=13) @@
592
     *
593
     * @return \eZ\Publish\API\Repository\Values\User\Policy[]
594
     */
595
    public function loadPoliciesByUserId($userId)
596
    {
597
        $values = $this->requestParser->parse('user', $userId);
598
        $response = $this->client->request(
599
            'GET',
600
            $this->requestParser->generate('userPolicies', array('user' => $values['user'])),
601
            new Message(
602
                array('Accept' => $this->outputVisitor->getMediaType('PolicyList'))
603
            )
604
        );
605
606
        return $this->inputDispatcher->parse($response);
607
    }
608
609
    /**
610
     * Assigns a role to the given user group.