OptionSet::getKeywords()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ReliqArts\Scavenger;
6
7
final class OptionSet
8
{
9
    private const DEFAULT_PAGE_LIMIT = 999999;
10
11
    private bool $saveScraps;
12
    private bool $convertScraps;
13
    private int $backOff;
14
    private int $pages;
15
    private ?string $keywords;
16
17
    /**
18
     * @codeCoverageIgnore
19
     */
20
    public function __construct(
21
        bool $saveScraps = true,
22
        bool $convertScraps = true,
23
        int $backOff = 3,
24
        int $pages = self::DEFAULT_PAGE_LIMIT,
25
        ?string $keywords = null
26
    ) {
27
        $this->saveScraps = $saveScraps;
28
        $this->convertScraps = $convertScraps;
29
        $this->backOff = $backOff;
30
        $this->pages = $pages;
31
        $this->keywords = $keywords;
32
    }
33
34
    public function isSaveScraps(): bool
35
    {
36
        return $this->saveScraps;
37
    }
38
39
    public function isConvertScraps(): bool
40
    {
41
        return $this->convertScraps;
42
    }
43
44
    public function getBackOff(): int
45
    {
46
        return $this->backOff;
47
    }
48
49
    public function getPages(): int
50
    {
51
        return $this->pages;
52
    }
53
54
    public function getKeywords(): ?string
55
    {
56
        return $this->keywords;
57
    }
58
}
59