Passed
Push — master ( 1fb483...35eebd )
by Roman
04:31
created

GenerateCriteria::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 4
dl 0
loc 6
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Crossword\Features\Generator;
6
7
/**
8
 * @psalm-immutable
9
 *
10
 * @see GenerateCommand
11
 */
12
final class GenerateCriteria
13
{
14
    private int $limit;
15
    private int $wordCount;
16
    private string $type;
17
    private string $language;
18
19
    public function __construct(string $type, string $language, int $wordCount, int $limit)
20
    {
21
        $this->type = $type;
22
        $this->wordCount = $wordCount;
23
        $this->limit = $limit;
24
        $this->language = $language;
25
    }
26
27
    public function type(): string
28
    {
29
        return $this->type;
30
    }
31
32
    public function language(): string
33
    {
34
        return $this->language;
35
    }
36
37
    public function wordCount(): int
38
    {
39
        return $this->wordCount;
40
    }
41
42
    public function limit(): int
43
    {
44
        return $this->limit;
45
    }
46
}
47