1 | <?php |
||
12 | class OpeningHoursForDay implements ArrayAccess, Countable, IteratorAggregate |
||
13 | { |
||
14 | /** @var array */ |
||
15 | protected $openingHours = []; |
||
16 | |||
17 | public static function fromStrings(array $strings) |
||
18 | { |
||
19 | $openingHoursForDay = new static(); |
||
20 | |||
21 | $timeRanges = Arr::map($strings, function ($string) { |
||
22 | return TimeRange::fromString($string); |
||
23 | }); |
||
24 | |||
25 | $openingHoursForDay->guardAgainstTimeRangeOverlaps($timeRanges); |
||
26 | |||
27 | $openingHoursForDay->openingHours = $timeRanges; |
||
28 | |||
29 | return $openingHoursForDay; |
||
30 | } |
||
31 | |||
32 | public function isOpenAt(Time $time) |
||
42 | |||
43 | public function nextOpen(Time $time) |
||
57 | |||
58 | private function findNextOpenInWorkingHours(Time $time, TimeRange $timeRange) |
||
64 | |||
65 | private function findNextOpenInFreeTime(Time $time, TimeRange $timeRange, TimeRange &$prevTimeRange = null) |
||
78 | |||
79 | public function offsetExists($offset): bool |
||
83 | |||
84 | public function offsetGet($offset) |
||
88 | |||
89 | public function offsetSet($offset, $value) |
||
93 | |||
94 | public function offsetUnset($offset) |
||
98 | |||
99 | public function count(): int |
||
103 | |||
104 | public function getIterator() |
||
108 | |||
109 | protected function guardAgainstTimeRangeOverlaps(array $openingHours) |
||
117 | } |
||
118 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.