Code Duplication    Length = 15-16 lines in 2 locations

src/WorldOfWarcraft/CharacterProfileApi/CharacterProfileApi.php 2 locations

@@ 176-190 (lines=15) @@
173
     *
174
     * @return array
175
     */
176
    public function getFeed()
177
    {
178
        $requestModel = $this->prepareRequestModel('feed');
179
        $response = $this->requestService->doRequest($requestModel);
180
        $responseObject = json_decode($response);
181
182
        $feedObjectFactory = new FeedObjectFactory();
183
        $feedObj = [];
184
185
        foreach ($responseObject->feed as $feed) {
186
            $feedObj[] = $feedObjectFactory->getFeedObject($feed);
187
        }
188
189
        return $feedObj;
190
    }
191
192
    /**
193
     * A summary of the guild that the character belongs to
@@ 524-539 (lines=16) @@
521
     *
522
     * @return ReputationValueObject[]
523
     */
524
    public function getTitles()
525
    {
526
        $requestModel = $this->prepareRequestModel('titles');
527
        $response = $this->requestService->doRequest($requestModel);
528
        $responseObject = json_decode($response);
529
        $titles = [];
530
531
        foreach ($responseObject->titles as $title) {
532
            $titles[] = new TitleValueObject(
533
                $title->id,
534
                $title->name
535
            );
536
        }
537
538
        return $titles;
539
    }
540
541
    /**
542
     * Raw character audit data that powers the character audit on the game site