Code Duplication    Length = 23-23 lines in 3 locations

src/PtrTn/Battlerite/Query/Criterion/GameModesCriterion.php 1 location

@@ 7-29 (lines=23) @@
4
5
use Webmozart\Assert\Assert;
6
7
class GameModesCriterion implements CriterionInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    private $gameModes;
13
14
    public function __construct(array $gameModes)
15
    {
16
        Assert::allString($gameModes, 'Specified game modes should be an array of strings');
17
        $this->gameModes = $gameModes;
18
    }
19
20
    public function toArray(): array
21
    {
22
        return ['filter[gameMode]' => implode(',', $this->gameModes)];
23
    }
24
25
    public function checkCollisionWithCriteria(array $critera): void
26
    {
27
        return;
28
    }
29
}
30

src/PtrTn/Battlerite/Query/Criterion/PlayerIdsCriterion.php 1 location

@@ 7-29 (lines=23) @@
4
5
use Webmozart\Assert\Assert;
6
7
class PlayerIdsCriterion implements CriterionInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    private $playerIds;
13
14
    public function __construct(array $playerIds)
15
    {
16
        Assert::allString($playerIds, 'Specified player ids should be an array of strings');
17
        $this->playerIds = $playerIds;
18
    }
19
20
    public function toArray(): array
21
    {
22
        return ['filter[playerIds]' => implode(',', $this->playerIds)];
23
    }
24
25
    public function checkCollisionWithCriteria(array $critera): void
26
    {
27
        return;
28
    }
29
}
30

src/PtrTn/Battlerite/Query/Criterion/TeamNamesCriterion.php 1 location

@@ 7-29 (lines=23) @@
4
5
use Webmozart\Assert\Assert;
6
7
class TeamNamesCriterion implements CriterionInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    private $teamNames;
13
14
    public function __construct(array $teamNames)
15
    {
16
        Assert::allString($teamNames, 'Specified team names should be an array of strings');
17
        $this->teamNames = $teamNames;
18
    }
19
20
    public function toArray(): array
21
    {
22
        return ['filter[teamNames]' => implode(',', $this->teamNames)];
23
    }
24
25
    public function checkCollisionWithCriteria(array $critera): void
26
    {
27
        return;
28
    }
29
}
30