Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.074 |
Changes | 0 |
1 | <?php |
||
41 | 1 | public function getPlayerByNameAndShard(string $playerName, string $shard) : ?Player |
|
42 | { |
||
43 | 1 | foreach ($this->items as $player) { |
|
44 | 1 | if ($player->shardId === $shard) { |
|
45 | 1 | if (strtolower($player->name) === strtolower($playerName)) { |
|
46 | 1 | return $player; |
|
47 | } |
||
48 | } |
||
49 | } |
||
50 | return null; |
||
51 | } |
||
52 | } |
||
53 |