Conditions | 3 |
Paths | 3 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
19 | public function prepareHunterPets(\StdClass $responseObject) |
||
20 | { |
||
21 | $hunterPets = []; |
||
22 | foreach ($responseObject->hunterPets as $hunterPet) { |
||
23 | $hunterPetSpecValueObject = null; |
||
24 | if (isset($hunterPet->spec)) { |
||
25 | $hunterPetSpecValueObject = $this->prepareHunterPetSpecValueObject($hunterPet->spec); |
||
26 | } |
||
27 | |||
28 | $hunterPets[] = new HunterPetValueObject( |
||
29 | $hunterPet->name, |
||
30 | $hunterPet->creature, |
||
31 | $hunterPet->slot, |
||
32 | $hunterPet->calcSpec, |
||
33 | $hunterPet->familyId, |
||
34 | $hunterPet->familyName, |
||
35 | $hunterPetSpecValueObject |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | return $hunterPets; |
||
40 | } |
||
41 | |||
58 |