Completed
Branch master (9f7b81)
by Bushlanov
03:31
created
Category
src/WorkingTime.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
 
130 130
         list($jobStart, $jobSEnd) = explode('-', $this->workingDays[$dateTime->format('w')]);
131 131
 
132
-        $dtStart = new \DateTime($dateTime->format('Y-m-d') . ' ' . $jobStart);
133
-        $dtEnd = new \DateTime($dateTime->format('Y-m-d') . ' ' . $jobSEnd);
132
+        $dtStart = new \DateTime($dateTime->format('Y-m-d').' '.$jobStart);
133
+        $dtEnd = new \DateTime($dateTime->format('Y-m-d').' '.$jobSEnd);
134 134
 
135 135
         if ($dateTime > $dtStart && $dateTime < $dtEnd) {
136 136
             return true;
@@ -181,28 +181,28 @@  discard block
 block discarded – undo
181 181
             $nextWorkingDay = $this->nextWorkingDay($dateTime->format('Y-m-d'));
182 182
             $nWDateTime = new \DateTime($nextWorkingDay);
183 183
             $workTime = explode('-', $this->workingDays[$nWDateTime->format('w')]);
184
-            return $nextWorkingDay . ' ' . $workTime[0];
184
+            return $nextWorkingDay.' '.$workTime[0];
185 185
         }
186 186
 
187 187
         list($jobStart, $jobSEnd) = explode('-', $this->workingDays[$dateTime->format('w')]);
188 188
 
189 189
         if ($this->isWorkingDate($dateTime->format('Y-m-d'))) { // Если день рабочий проверяем время
190 190
 
191
-            $dtStart = new \DateTime($dateTime->format('Y-m-d') . ' ' . $jobStart);
192
-            $dtEnd = new \DateTime($dateTime->format('Y-m-d') . ' ' . $jobSEnd);
191
+            $dtStart = new \DateTime($dateTime->format('Y-m-d').' '.$jobStart);
192
+            $dtEnd = new \DateTime($dateTime->format('Y-m-d').' '.$jobSEnd);
193 193
 
194 194
             // Если начало дня еще не наступило (утро) возвращаем указанную дату + время
195 195
             if ($dateTime < $dtStart) {
196
-                $nextWorkingTime = $dateTime->format('Y-m-d') . ' ' . $jobStart;
196
+                $nextWorkingTime = $dateTime->format('Y-m-d').' '.$jobStart;
197 197
             } elseif ($dateTime >= $dtEnd) { // Если рабочий день уже закончился
198 198
                 // Ищем следующий рабочий день и выводим его + время начало дня
199
-                $nextWorkingTime = $this->nextWorkingDay($dateTime->format('Y-m-d')) . ' ' . $jobStart;
199
+                $nextWorkingTime = $this->nextWorkingDay($dateTime->format('Y-m-d')).' '.$jobStart;
200 200
             }
201 201
 
202 202
         } else { // Если день не рабочий
203 203
 
204 204
             // Ищем следующий рабочий день и выводим его + время начало дня
205
-            $nextWorkingTime = $this->nextWorkingDay($dateTime->format('Y-m-d')) . ' ' . $jobStart;
205
+            $nextWorkingTime = $this->nextWorkingDay($dateTime->format('Y-m-d')).' '.$jobStart;
206 206
 
207 207
         }
208 208
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
         $nextWorkingTime = $this->nextWorkingTime($date ?? $this->dateTime->format('Y-m-d H:i'));
228 228
 
229
-        list($jobStart, $jobSEnd) = explode('-', $this->workingDays[(int)$day]);
229
+        list($jobStart, $jobSEnd) = explode('-', $this->workingDays[(int) $day]);
230 230
         // Считаем остаток рабочего времени
231 231
         if (empty($nextWorkingTime)) {
232 232
             $jobStart = ($date === null ? date('H:i', $this->dateTime->getTimestamp()) : date('H:i',
Please login to merge, or discard this patch.