Completed
Pull Request — master (#62)
by Andreas
01:18
created
src/HolidayIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/CalendarDayFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/CalendarDay.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/IteratorItem/EasterOrthodox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/IteratorItem/DateFollowUp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@
 block discarded – undo
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];
Please login to merge, or discard this patch.
src/HolidayIteratorFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
         $dom->load($file);
62 62
         $dom->xinclude();
63 63
 
64
-        if (! $dom->schemaValidate(__DIR__ . '/../share/holidays.xsd')) {
64
+        if (!$dom->schemaValidate(__DIR__ . '/../share/holidays.xsd')) {
65 65
             throw new \Exception('XML-File does not validate agains schema');
66 66
         }
67 67
         foreach ($dom->documentElement->childNodes as $child) {
68
-            if (! $child instanceof \DOMElement) {
68
+            if (!$child instanceof \DOMElement) {
69 69
                 continue;
70 70
             }
71 71
             $iterator->append($this->getElement($child));
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $file = __DIR__ . '/../share/%s.xml';
87 87
         $file1 = sprintf($file, $isoCode);
88 88
 
89
-        if (! is_readable($file1)) {
89
+        if (!is_readable($file1)) {
90 90
             throw new \UnexpectedValueException(sprintf(
91 91
                 'There is no holiday-file for %s',
92 92
                 $isoCode
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 $day = CalendarDayFactory::createCalendarDay(
117 117
                     (int) $child->getAttribute('day'),
118 118
                     (int) $child->getAttribute('month'),
119
-                    ($child->hasAttribute('calendar')?$child->getAttribute('calendar'): 'gregorian')
119
+                    ($child->hasAttribute('calendar') ? $child->getAttribute('calendar') : 'gregorian')
120 120
                 );
121 121
                 if ($child->hasAttribute('year')) {
122 122
                     $day->setYear((int) $child->getAttribute('year'));
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 $day = CalendarDayFactory::createCalendarDay(
131 131
                     (int) $child->getAttribute('day'),
132 132
                     (int) $child->getAttribute('month'),
133
-                    ($child->hasAttribute('calendar')?$child->getAttribute('calendar'): 'gregorian')
133
+                    ($child->hasAttribute('calendar') ? $child->getAttribute('calendar') : 'gregorian')
134 134
                 );
135 135
 
136 136
                 return new DateFollowUp(
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     $this->getFree($child),
139 139
                     $day,
140 140
                     $child->getAttribute('followup'),
141
-                    ($child->hasAttribute('replaced')?explode(' ', $child->getAttribute('replaced')):[])
141
+                    ($child->hasAttribute('replaced') ?explode(' ', $child->getAttribute('replaced')) : [])
142 142
                 );
143 143
             case 'relative':
144 144
                 return new Relative(
Please login to merge, or discard this patch.