Code Duplication    Length = 23-23 lines in 5 locations

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

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

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

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

src/PtrTn/Battlerite/Query/Players/PlayerNamesCriterion.php 1 location

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

src/PtrTn/Battlerite/Query/Players/SteamIdsCriterion.php 1 location

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

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

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