@@ -69,7 +69,7 @@ |
||
| 69 | 69 | $orthodoxEaster = $this->getOrthodoxEaster($year); |
| 70 | 70 | if ($endOfPessach > $orthodoxEaster) { |
| 71 | 71 | $weekday = (int) $endOfPessach->format('w'); |
| 72 | - return $endOfPessach->add(new DateInterval('P' . (7-$weekday) . 'D')); |
|
| 72 | + return $endOfPessach->add(new DateInterval('P' . (7 - $weekday) . 'D')); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | return $orthodoxEaster; |
@@ -102,8 +102,8 @@ |
||
| 102 | 102 | ]; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - return array_map(function (string $day) use ($daymap) { |
|
| 106 | - if (! isset($daymap[$day])) { |
|
| 105 | + return array_map(function(string $day) use ($daymap) { |
|
| 106 | + if (!isset($daymap[$day])) { |
|
| 107 | 107 | return null; |
| 108 | 108 | } |
| 109 | 109 | return $daymap[$day]; |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | public static function createCalendarDay(int $day, int $month, string $calendar): CalendarDay |
| 42 | 42 | { |
| 43 | - if (! Calendar::isValidCalendarName($calendar)) { |
|
| 43 | + if (!Calendar::isValidCalendarName($calendar)) { |
|
| 44 | 44 | throw new UnknownCalendar(sprintf( |
| 45 | 45 | 'The calendar %s is not known to the ICU', |
| 46 | 46 | $calendar |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | #[\ReturnTypeWillChange] |
| 47 | 47 | public function append($value) |
| 48 | 48 | { |
| 49 | - if (! $value instanceof HolidayIteratorItemInterface) { |
|
| 49 | + if (!$value instanceof HolidayIteratorItemInterface) { |
|
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | $dom->load($file); |
| 67 | 67 | $dom->xinclude(); |
| 68 | 68 | |
| 69 | - if (! @$dom->schemaValidate(__DIR__ . '/../share/holidays.xsd')) { |
|
| 69 | + if (!@$dom->schemaValidate(__DIR__ . '/../share/holidays.xsd')) { |
|
| 70 | 70 | throw new Exception('XML-File does not validate agains schema'); |
| 71 | 71 | } |
| 72 | 72 | foreach ($dom->documentElement->childNodes as $child) { |
| 73 | - if (! $child instanceof DOMElement) { |
|
| 73 | + if (!$child instanceof DOMElement) { |
|
| 74 | 74 | continue; |
| 75 | 75 | } |
| 76 | 76 | if ($child->nodeName === 'resources') { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $file = __DIR__ . '/../share/%s.xml'; |
| 95 | 95 | $file1 = sprintf($file, $isoCode); |
| 96 | 96 | |
| 97 | - if (! is_readable($file1)) { |
|
| 97 | + if (!is_readable($file1)) { |
|
| 98 | 98 | throw new UnexpectedValueException(sprintf( |
| 99 | 99 | 'There is no holiday-file for %s', |
| 100 | 100 | $isoCode |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $day = CalendarDayFactory::createCalendarDay( |
| 124 | 124 | (int) $child->getAttribute('day'), |
| 125 | 125 | (int) $child->getAttribute('month'), |
| 126 | - ($child->hasAttribute('calendar')?$child->getAttribute('calendar'): 'gregorian') |
|
| 126 | + ($child->hasAttribute('calendar') ? $child->getAttribute('calendar') : 'gregorian') |
|
| 127 | 127 | ); |
| 128 | 128 | if ($child->hasAttribute('year')) { |
| 129 | 129 | $day->setYear((int) $child->getAttribute('year')); |
@@ -132,16 +132,16 @@ discard block |
||
| 132 | 132 | $child->textContent, |
| 133 | 133 | $this->getFree($child), |
| 134 | 134 | $day, |
| 135 | - $child->hasAttribute('forwardto')?$child->getAttribute('forwardto'):'', |
|
| 136 | - $child->hasAttribute('forwardwhen')?explode(' ', $child->getAttribute('forwardwhen')):[], |
|
| 137 | - $child->hasAttribute('rewindto')?$child->getAttribute('rewindto'):'', |
|
| 138 | - $child->hasAttribute('rewindwhen')?explode(' ', $child->getAttribute('rewindwhen')):[], |
|
| 135 | + $child->hasAttribute('forwardto') ? $child->getAttribute('forwardto') : '', |
|
| 136 | + $child->hasAttribute('forwardwhen') ?explode(' ', $child->getAttribute('forwardwhen')) : [], |
|
| 137 | + $child->hasAttribute('rewindto') ? $child->getAttribute('rewindto') : '', |
|
| 138 | + $child->hasAttribute('rewindwhen') ?explode(' ', $child->getAttribute('rewindwhen')) : [], |
|
| 139 | 139 | ); |
| 140 | 140 | case 'dateFollowUp': |
| 141 | 141 | $day = CalendarDayFactory::createCalendarDay( |
| 142 | 142 | (int) $child->getAttribute('day'), |
| 143 | 143 | (int) $child->getAttribute('month'), |
| 144 | - ($child->hasAttribute('calendar')?$child->getAttribute('calendar'): 'gregorian') |
|
| 144 | + ($child->hasAttribute('calendar') ? $child->getAttribute('calendar') : 'gregorian') |
|
| 145 | 145 | ); |
| 146 | 146 | |
| 147 | 147 | return new DateFollowUp( |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $this->getFree($child), |
| 150 | 150 | $day, |
| 151 | 151 | $child->getAttribute('followup'), |
| 152 | - ($child->hasAttribute('replaced')?explode(' ', $child->getAttribute('replaced')):[]) |
|
| 152 | + ($child->hasAttribute('replaced') ?explode(' ', $child->getAttribute('replaced')) : []) |
|
| 153 | 153 | ); |
| 154 | 154 | case 'relative': |
| 155 | 155 | return new Relative( |
@@ -113,8 +113,8 @@ |
||
| 113 | 113 | 'saturday' => IntlCalendar::DOW_SATURDAY, |
| 114 | 114 | ]; |
| 115 | 115 | |
| 116 | - return array_map(function (string $day) use ($daymap) { |
|
| 117 | - if (! isset($daymap[$day])) { |
|
| 116 | + return array_map(function(string $day) use ($daymap) { |
|
| 117 | + if (!isset($daymap[$day])) { |
|
| 118 | 118 | return null; |
| 119 | 119 | } |
| 120 | 120 | return $daymap[$day]; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $day = $cal->toDateTime(); |
| 124 | 124 | $day->modify('next ' . $followUpDay); |
| 125 | 125 | $cal->setTime($day->getTimestamp() * 1000); |
| 126 | - $cal2 = clone $this->calendar; |
|
| 126 | + $cal2 = clone $this->calendar; |
|
| 127 | 127 | $cal2->setTime($dateTime->getTimestamp() * 1000); |
| 128 | 128 | |
| 129 | 129 | if (null !== $this->year && $cal->get(IntlCalendar::FIELD_YEAR) !== $cal2->get(IntlCalendar::FIELD_YEAR)) { |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $day = $cal->toDateTime(); |
| 145 | 145 | $day->modify('previous ' . $previousDay); |
| 146 | 146 | $cal->setTime($day->getTimestamp() * 1000); |
| 147 | - $cal2 = clone $this->calendar; |
|
| 147 | + $cal2 = clone $this->calendar; |
|
| 148 | 148 | $cal2->setTime($dateTime->getTimestamp() * 1000); |
| 149 | 149 | |
| 150 | 150 | if (null !== $this->year && $cal->get(IntlCalendar::FIELD_YEAR) !== $cal2->get(IntlCalendar::FIELD_YEAR)) { |