Completed
Push — master ( 88fe7e...615209 )
by William Johnson S.
02:00
created
src/HttpApi.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -387,6 +387,9 @@
 block discarded – undo
387 387
         return $punches;
388 388
     }
389 389
 
390
+    /**
391
+     * @param string $date
392
+     */
390 393
     private function createPunchesDate($date, array $punches = [])
391 394
     {
392 395
         $dates = [];
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function getPunchs($month = null, $year = null)
122 122
     {
123
-        $month = $month !== null ? $month : (int)date('m');
124
-        $year = $year !== null ? $year : (int)date('Y');
123
+        $month = $month !== null ? $month : (int) date('m');
124
+        $year = $year !== null ? $year : (int) date('Y');
125 125
 
126 126
         if (!$this->isValidPeriod($month, $year)) {
127 127
             throw new InvalidArgumentException('Invalid period of time');
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     private function getPunchsFromPage(IHttpResponse $punchsPageResponse)
305 305
     {
306 306
         if ($punchsPageResponse->getHttpStatus() !== IHttpClient::HTTP_STATUS_OK) {
307
-            throw new InvalidArgumentException('The request returned http status ' . $punchsPageResponse->getHttpStatus());
307
+            throw new InvalidArgumentException('The request returned http status '.$punchsPageResponse->getHttpStatus());
308 308
         }
309 309
 
310 310
         $punchs = $this->parsePunchsPage($punchsPageResponse);
Please login to merge, or discard this patch.
src/AbstractApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
      */
47 47
     protected function isValidPeriod($month, $year)
48 48
     {
49
-        $currentYear = (int)date('Y');
50
-        $currentMonth = (int)date('m');
49
+        $currentYear = (int) date('Y');
50
+        $currentMonth = (int) date('m');
51 51
 
52 52
         return $this->isValidMonth($month) && $this->isValidYear($year) && ($year < $currentYear || $year === $currentYear && $month <= $currentMonth);
53 53
     }
Please login to merge, or discard this patch.