@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | public function append($value) |
39 | 39 | { |
40 | - if (! $value instanceof HolidayIteratorItemInterface) { |
|
40 | + if (!$value instanceof HolidayIteratorItemInterface) { |
|
41 | 41 | return; |
42 | 42 | } |
43 | 43 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $orthodoxEaster = $this->getOrthodoxEaster($year); |
63 | 63 | if ($endOfPessach > $orthodoxEaster) { |
64 | 64 | $weekday = $endOfPessach->format('w'); |
65 | - return $endOfPessach->add(new \DateInterval('P' . (7-$weekday) . 'D')); |
|
65 | + return $endOfPessach->add(new \DateInterval('P' . (7 - $weekday) . 'D')); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | return $orthodoxEaster; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | public static function createCalendarDay(int $day, int $month, string $calendar) : CalendarDay |
38 | 38 | { |
39 | - if (! Calendar::isValidCalendarName($calendar)) { |
|
39 | + if (!Calendar::isValidCalendarName($calendar)) { |
|
40 | 40 | throw new UnknownCalendar(sprintf( |
41 | 41 | 'The calendar %s is not known to the ICU', |
42 | 42 | $calendar |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | public function isSameDay(DateTimeInterface $dateTime) : bool |
66 | 66 | { |
67 | - $cal = clone $this->calendar; |
|
67 | + $cal = clone $this->calendar; |
|
68 | 68 | $cal->setTime($dateTime->getTimestamp() * 1000); |
69 | 69 | |
70 | 70 | if (null !== $this->year && |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $day = $cal->toDateTime(); |
92 | 92 | $day->modify('next ' . $followUpDay); |
93 | 93 | $cal->setTime($day->getTimestamp() * 1000); |
94 | - $cal2 = clone $this->calendar; |
|
94 | + $cal2 = clone $this->calendar; |
|
95 | 95 | $cal2->setTime($dateTime->getTimestamp() * 1000); |
96 | 96 | |
97 | 97 | if (null !== $this->year && $cal->get(IntlCalendar::FIELD_YEAR) !== $cal2->get(IntlCalendar::FIELD_YEAR)) { |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | $dom->load($file); |
57 | 57 | $dom->xinclude(); |
58 | 58 | |
59 | - if (! $dom->schemaValidate(__DIR__ . '/../share/holidays.xsd')) { |
|
59 | + if (!$dom->schemaValidate(__DIR__ . '/../share/holidays.xsd')) { |
|
60 | 60 | throw new \Exception('XML-File does not validate agains schema'); |
61 | 61 | } |
62 | 62 | foreach ($dom->documentElement->childNodes as $child) { |
63 | - if (! $child instanceof \DOMElement) { |
|
63 | + if (!$child instanceof \DOMElement) { |
|
64 | 64 | continue; |
65 | 65 | } |
66 | 66 | $iterator->append($this->getElement($child)); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $file = __DIR__ . '/../share/%s.xml'; |
82 | 82 | $file1 = sprintf($file, $isoCode); |
83 | 83 | |
84 | - if (! is_readable($file1)) { |
|
84 | + if (!is_readable($file1)) { |
|
85 | 85 | throw new \UnexpectedValueException(sprintf( |
86 | 86 | 'There is no holiday-file for %s', |
87 | 87 | $isoCode |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $day = CalendarDayFactory::createCalendarDay( |
112 | 112 | $child->getAttribute('day'), |
113 | 113 | $child->getAttribute('month'), |
114 | - ($child->hasAttribute('calendar')?$child->getAttribute('calendar'): 'gregorian') |
|
114 | + ($child->hasAttribute('calendar') ? $child->getAttribute('calendar') : 'gregorian') |
|
115 | 115 | ); |
116 | 116 | if ($child->hasAttribute('year')) { |
117 | 117 | $day->setYear($child->getAttribute('year')); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $day = CalendarDayFactory::createCalendarDay( |
126 | 126 | $child->getAttribute('day'), |
127 | 127 | $child->getAttribute('month'), |
128 | - ($child->hasAttribute('calendar')?$child->getAttribute('calendar'): 'gregorian') |
|
128 | + ($child->hasAttribute('calendar') ? $child->getAttribute('calendar') : 'gregorian') |
|
129 | 129 | ); |
130 | 130 | |
131 | 131 | return new DateFollowUp( |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $this->getFree($child), |
134 | 134 | $day, |
135 | 135 | $child->getAttribute('followup'), |
136 | - ($child->hasAttribute('replaced')?explode(' ', $child->getAttribute('replaced')):[]) |
|
136 | + ($child->hasAttribute('replaced') ?explode(' ', $child->getAttribute('replaced')) : []) |
|
137 | 137 | ); |
138 | 138 | case 'relative': |
139 | 139 | return new Relative( |
@@ -94,8 +94,8 @@ |
||
94 | 94 | ]; |
95 | 95 | } |
96 | 96 | |
97 | - return array_map(function ($day) use ($daymap) { |
|
98 | - if (! isset($daymap[$day])) { |
|
97 | + return array_map(function($day) use ($daymap) { |
|
98 | + if (!isset($daymap[$day])) { |
|
99 | 99 | return null; |
100 | 100 | } |
101 | 101 | return $daymap[$day]; |