1 | <?php declare(strict_types=1); |
||
12 | class Result |
||
13 | { |
||
14 | const TEST_UNIQUE_IDS = 'unique_ids'; |
||
15 | |||
16 | const TEST_NORMAL_DATE_FLOW = 'normal_date_flow'; |
||
17 | |||
18 | private $url; |
||
19 | |||
20 | private $modifiedSince = 'null'; |
||
21 | |||
22 | private $itemDates = []; |
||
23 | |||
24 | private $itemCount = 0; |
||
25 | |||
26 | private $accessible = true; |
||
27 | |||
28 | private $updateable = true; |
||
29 | |||
30 | private $tests = [ |
||
31 | self::TEST_UNIQUE_IDS => true, |
||
32 | self::TEST_NORMAL_DATE_FLOW => true, |
||
33 | ]; |
||
34 | |||
35 | public function __construct(string $url) |
||
39 | |||
40 | public function setNotAccessible(): self |
||
47 | |||
48 | public function isUpdateable(): bool |
||
52 | |||
53 | public function setNotUpdateable(): Result |
||
60 | |||
61 | public function setModifiedSince(\DateTime $modifiedSince): self |
||
66 | |||
67 | /** |
||
68 | * @return int |
||
69 | */ |
||
70 | public function getItemCount(): int |
||
74 | |||
75 | public function setItemCount(int $itemCount): self |
||
80 | |||
81 | /** |
||
82 | * @return array<DateTime> |
||
83 | */ |
||
84 | public function getItemDates(): array |
||
88 | |||
89 | /** |
||
90 | * @param array<DateTime> $itemDates |
||
91 | */ |
||
92 | public function setItemDates(array $itemDates): void |
||
96 | |||
97 | protected function markAllAsFailed(): void |
||
103 | |||
104 | public function markAsFailed(string $test): self |
||
109 | |||
110 | public function toArray(): array |
||
122 | } |
||
123 |