1 | <?php declare(strict_types=1); |
||
10 | class Result |
||
11 | { |
||
12 | const TEST_UNIQUE_IDS = 'unique_ids'; |
||
13 | |||
14 | const TEST_NORMAL_DATE_FLOW = 'normal_date_flow'; |
||
15 | |||
16 | const TEST_JAN_1970 = 'jan_1970'; |
||
17 | |||
18 | const TEST_1YEAR_OLD = '1year_old'; |
||
19 | |||
20 | const TEST_EMPTY_FUTURE = 'empty_future'; |
||
21 | |||
22 | private $url; |
||
23 | |||
24 | private $modifiedSince = 'null'; |
||
25 | |||
26 | private $itemCount = 0; |
||
27 | |||
28 | private $accessible = true; |
||
29 | |||
30 | private $updateable = true; |
||
31 | |||
32 | private $tests = [ |
||
33 | self::TEST_UNIQUE_IDS => true, |
||
34 | self::TEST_NORMAL_DATE_FLOW => true, |
||
35 | self::TEST_JAN_1970 => true, |
||
36 | self::TEST_1YEAR_OLD => true, |
||
37 | self::TEST_EMPTY_FUTURE => true, |
||
38 | ]; |
||
39 | |||
40 | public function __construct(string $url) |
||
44 | |||
45 | public function setNotAccessible(): self |
||
52 | |||
53 | public function isUpdateable(): bool |
||
57 | |||
58 | public function setNotUpdateable(): Result |
||
65 | |||
66 | public function setModifiedSince(\DateTime $modifiedSince): self |
||
71 | |||
72 | public function setItemCount(int $itemCount): self |
||
77 | |||
78 | protected function markAllAsFailed(): void |
||
84 | |||
85 | public function markAsFailed(string $test): self |
||
90 | |||
91 | public function toArray(): array |
||
106 | } |
||
107 |