Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 138-149 (lines=12) @@
135
    /**
136
     * {@inheritdoc).
137
     */
138
    public function loadLocationList(array $locationIds, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null): iterable
139
    {
140
        // @todo Implement server part, ala: https://gist.github.com/andrerom/f2f328029ae7a9d78b363282b3ddf4a4
141
142
        $response = $this->client->request(
143
            'GET',
144
            $this->requestParser->generate('locationsByIds', ['locations' => $locationIds]),
145
            new Message(['Accept' => $this->outputVisitor->getMediaType('LocationList')])
146
        );
147
148
        return $this->inputDispatcher->parse($response);
149
    }
150
151
    /**
152
     * {@inheritdoc).
@@ 154-165 (lines=12) @@
151
    /**
152
     * {@inheritdoc).
153
     */
154
    public function loadLocationByRemoteId($remoteId, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null)
155
    {
156
        $response = $this->client->request(
157
            'GET',
158
            $this->requestParser->generate('locationByRemote', ['location' => $remoteId]),
159
            new Message(
160
                ['Accept' => $this->outputVisitor->getMediaType('LocationList')]
161
            )
162
        );
163
164
        return reset($this->inputDispatcher->parse($response));
165
    }
166
167
    /**
168
     * Instantiates a new location update class.