Completed
Push — master ( a79d86...61314e )
by Nuno
01:56
created
src/Scheduler.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -104,18 +104,15 @@
 block discarded – undo
104 104
                 if (strpos($schedule, '+') !== false) {
105 105
                     if ($this->startTime instanceof \DateTime && $d < $this->startTime->modify($d->format('Y-m-d'))) {
106 106
                         $d->modify($this->startTime->format('H:i:s'));
107
-                    }
108
-                    elseif ($this->endTime instanceof \DateTime && $d > $this->endTime->modify($d->format('Y-m-d'))) {
107
+                    } elseif ($this->endTime instanceof \DateTime && $d > $this->endTime->modify($d->format('Y-m-d'))) {
109 108
                         $d->modify('next day')->modify($this->startTime->format('H:i:s'));
110 109
                     }
111 110
 
112 111
                     $dates[] = clone $d;
113 112
                     $d->modify($schedule);
114
-                }
115
-                elseif ($this->isInTimeFrame($d->modify($schedule), $fromDateStr)) {
113
+                } elseif ($this->isInTimeFrame($d->modify($schedule), $fromDateStr)) {
116 114
                     $dates[] = clone $d;
117
-                }
118
-                else {
115
+                } else {
119 116
                     --$i;
120 117
                 }
121 118
             }
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
         $dates = [];
92 92
 
93 93
         foreach ($this->oneTimeEvents as $schedule) {
94
-			$dt = new \DateTime($fromDateStr);
95
-			$dt->modify($schedule);
94
+            $dt = new \DateTime($fromDateStr);
95
+            $dt->modify($schedule);
96 96
 			
97 97
             if ($this->isInTimeFrame($dt, $fromDateStr)) {
98 98
                 $dates[] = $dt;
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
     /**
133 133
      * @param array $dates
134
-	 * @return array
134
+     * @return array
135 135
      */
136 136
     private function orderDates( &$dates )
137 137
     {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
     /**
144 144
      * @param \DateTime $date
145
-	 * @return bool
145
+     * @return bool
146 146
      */
147 147
     private function isInTimeFrame(\DateTime $date, $fromDateStr = 'now')
148 148
     {
@@ -160,13 +160,13 @@  discard block
 block discarded – undo
160 160
         return true;
161 161
     }
162 162
 
163
-	/**
164
-	 * @param string $dateStr \Datetime object valid date string
165
-	 * @return bool
166
-	 */
167
-	private function isDateRelative($dateStr)
168
-	{
169
-		return strpos($dateStr, '+') !== false;
170
-	}
163
+    /**
164
+     * @param string $dateStr \Datetime object valid date string
165
+     * @return bool
166
+     */
167
+    private function isDateRelative($dateStr)
168
+    {
169
+        return strpos($dateStr, '+') !== false;
170
+    }
171 171
 
172 172
 }
173 173
\ No newline at end of file
Please login to merge, or discard this patch.