Code Duplication    Length = 11-14 lines in 5 locations

src/WorldOfWarcraft/CharacterProfileApi/CharacterProfileApi.php 5 locations

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