Test Setup Failed
Push — master ( 6def47...3181cf )
by William Johnson S.
02:29
created
src/RestApi.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         }
177 177
         $punches = $this->getPunches($month, $year);
178 178
 
179
-        return array_filter($punches['punches'], function (\DateTime $punchDateTime) use ($day) {
179
+        return array_filter($punches['punches'], function(\DateTime $punchDateTime) use ($day) {
180 180
             return (int) $punchDateTime->format('d') === (int) $day;
181 181
         });
182 182
     }
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      * @return mixed
234 234
      */
235 235
     private function getData() {
236
-        return once(function () {
236
+        return once(function() {
237 237
             $params = [
238 238
                 'company'   => $this->companyId,
239 239
                 'matricula' => $this->username,
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     }
252 252
 
253 253
     private function buildUrl($endpoint, array $params = []) {
254
-        return once(function () use ($endpoint, $params) {
254
+        return once(function() use ($endpoint, $params) {
255 255
             return vsprintf($endpoint, array_merge([static::API_BASE_URL], $params));
256 256
         });
257 257
     }
@@ -277,10 +277,10 @@  discard block
 block discarded – undo
277 277
 
278 278
         foreach ($dias as $dia => $dadosDia) {
279 279
             // Parse falta
280
-            $falta = array_filter($dadosDia->resultado, function ($item) { return $item->tipo == 'FALTA'; });
280
+            $falta = array_filter($dadosDia->resultado, function($item) { return $item->tipo == 'FALTA'; });
281 281
 
282 282
             // Parse extra
283
-            $extra = array_filter($dadosDia->resultado, function ($item) { return $item->tipo == 'Extra'; });
283
+            $extra = array_filter($dadosDia->resultado, function($item) { return $item->tipo == 'Extra'; });
284 284
 
285 285
             $tmp[$dia][] = [
286 286
                 'falta' => empty($falta) ? '00:00' : preg_replace('/^(-)?(\d{2})(\d{2})$/i', '\1\2:\3', array_shift($falta)->valor),
Please login to merge, or discard this patch.