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

GenerateCriteria   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 33
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A language() 0 3 1
A type() 0 3 1
A __construct() 0 6 1
A limit() 0 3 1
A wordCount() 0 3 1
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