1 | <?php |
||
10 | class PeriodCollection implements ArrayAccess, Iterator, Countable |
||
11 | { |
||
12 | use IterableImplementation; |
||
13 | |||
14 | /** @var \Spatie\Period\Period[] */ |
||
15 | protected $periods; |
||
16 | |||
17 | /** |
||
18 | * @param \Spatie\Period\Period ...$periods |
||
19 | * |
||
20 | * @return static |
||
21 | */ |
||
22 | public static function make(Period ...$periods): PeriodCollection |
||
26 | |||
27 | public function __construct(Period ...$periods) |
||
31 | |||
32 | public function current(): Period |
||
36 | |||
37 | /** |
||
38 | * @param \Spatie\Period\PeriodCollection $periodCollection |
||
39 | * |
||
40 | * @return static |
||
41 | */ |
||
42 | public function overlapSingle(PeriodCollection $periodCollection): PeriodCollection |
||
58 | |||
59 | /** |
||
60 | * @param \Spatie\Period\PeriodCollection ...$periodCollections |
||
61 | * |
||
62 | * @return static |
||
63 | */ |
||
64 | public function overlap(PeriodCollection ...$periodCollections): PeriodCollection |
||
74 | |||
75 | public function boundaries(): ?Period |
||
103 | |||
104 | /** |
||
105 | * @return static |
||
106 | */ |
||
107 | public function gaps(): PeriodCollection |
||
117 | |||
118 | /** |
||
119 | * @param \Spatie\Period\Period $intersection |
||
120 | * |
||
121 | * @return static |
||
122 | */ |
||
123 | public function intersect(Period $intersection): PeriodCollection |
||
139 | |||
140 | /** |
||
141 | * @param \Spatie\Period\Period ...$periods |
||
142 | * |
||
143 | * @return static |
||
144 | */ |
||
145 | public function add(Period ...$periods): PeriodCollection |
||
155 | |||
156 | /** |
||
157 | * @param \Closure $closure |
||
158 | * |
||
159 | * @return static |
||
160 | */ |
||
161 | public function map(Closure $closure): PeriodCollection |
||
171 | |||
172 | /** |
||
173 | * @param \Closure $closure |
||
174 | * @param mixed $initial |
||
175 | * |
||
176 | * @return mixed|null |
||
177 | */ |
||
178 | public function reduce(Closure $closure, $initial = null) |
||
188 | |||
189 | public function isEmpty(): bool |
||
193 | } |
||
194 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.