Total Complexity | 6 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
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 |
||
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 |
||
57 | } |
||
58 | } |
||
59 |