Code Duplication    Length = 11-14 lines in 5 locations

src/WorldOfWarcraft/CharacterProfileApi/CharacterProfileApi.php 5 locations

@@ 370-383 (lines=14) @@
367
     *
368
     * @return ProgressionValueObject
369
     */
370
    public function getProgression()
371
    {
372
        $requestModel = $this->prepareRequestModel('progression');
373
        $response = $this->requestService->doRequest($requestModel);
374
        $responseObject = json_decode($response);
375
376
        $raids = $this->prepareRaidValueObject($responseObject);
377
378
        $progression = new ProgressionValueObject(
379
            $raids
380
        );
381
382
        return $progression;
383
    }
384
385
    /**
386
     * A map of pvp information including arena team membership and rated battlegrounds information
@@ 390-403 (lines=14) @@
387
     *
388
     * @return PvpValueObject
389
     */
390
    public function getPvp()
391
    {
392
        $requestModel = $this->prepareRequestModel('pvp');
393
        $response = $this->requestService->doRequest($requestModel);
394
        $responseObject = json_decode($response);
395
396
        $brackets = $this->prepareBracketValueObject($responseObject);
397
398
        $progression = new PvpValueObject(
399
            $brackets
400
        );
401
402
        return $progression;
403
    }
404
405
    /**
406
     * A list of quests completed by the character
@@ 410-421 (lines=12) @@
407
     *
408
     * @return QuestsValueObject
409
     */
410
    public function getQuests()
411
    {
412
        $requestModel = $this->prepareRequestModel('quests');
413
        $response = $this->requestService->doRequest($requestModel);
414
        $responseObject = json_decode($response);
415
416
        $quests = new QuestsValueObject(
417
            $responseObject->quests
418
        );
419
420
        return $quests;
421
    }
422
423
    /**
424
     * A list of the factions that the character has an associated reputation with
@@ 453-463 (lines=11) @@
450
     *
451
     * @return StatisticsValueObject
452
     */
453
    public function getStatistics()
454
    {
455
        $requestModel = $this->prepareRequestModel('statistics');
456
        $response = $this->requestService->doRequest($requestModel);
457
        $responseObject = json_decode($response);
458
        $statisticsService = new StatisticService();
459
460
        $statistics = $statisticsService->getStatistics($responseObject->statistics);
461
462
        return $statistics;
463
    }
464
465
    /**
466
     * A map of character attributes and stats
@@ 470-480 (lines=11) @@
467
     *
468
     * @return StatValueObject
469
     */
470
    public function getStats()
471
    {
472
        $requestModel = $this->prepareRequestModel('stats');
473
        $response = $this->requestService->doRequest($requestModel);
474
        $responseObject = json_decode($response);
475
        $statService = new StatService();
476
477
        $stats = $statService->getStatValueObject($responseObject->stats);
478
479
        return $stats;
480
    }
481
482
    /**
483
     * A list of talent structures