@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function from($str) |
| 66 | 66 | { |
| 67 | - $this->start_date = date('Y-m-d',strtotime($str)).'T00:00:00-00:00'; |
|
| 67 | + $this->start_date = date('Y-m-d',strtotime($str)).'T00:00:00-00:00'; |
|
| 68 | 68 | return $this; |
| 69 | 69 | } |
| 70 | 70 | /** |
@@ -144,10 +144,10 @@ discard block |
||
| 144 | 144 | $result = []; |
| 145 | 145 | |
| 146 | 146 | $api_url = "https://content.googleapis.com/calendar/v3/calendars/en.{$this->country_code}%23holiday%40group.v.calendar.google.com/events". |
| 147 | - '?singleEvents=false'. |
|
| 148 | - "&timeMax={$this->end_date}". |
|
| 149 | - "&timeMin={$this->start_date}". |
|
| 150 | - "&key={$this->api_key}"; |
|
| 147 | + '?singleEvents=false'. |
|
| 148 | + "&timeMax={$this->end_date}". |
|
| 149 | + "&timeMin={$this->start_date}". |
|
| 150 | + "&key={$this->api_key}"; |
|
| 151 | 151 | |
| 152 | 152 | $response = json_decode(file_get_contents($api_url), true); |
| 153 | 153 | |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | } elseif ($this->minimal === true) { |
| 162 | 162 | foreach ($response['items'] as $holiday) { |
| 163 | 163 | $result[] = [ |
| 164 | - 'name' => $holiday['summary'], |
|
| 165 | - 'date' => $holiday['start']['date'], |
|
| 164 | + 'name' => $holiday['summary'], |
|
| 165 | + 'date' => $holiday['start']['date'], |
|
| 166 | 166 | ]; |
| 167 | 167 | } |
| 168 | 168 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function from($str) |
| 66 | 66 | { |
| 67 | - $this->start_date = date('Y-m-d',strtotime($str)).'T00:00:00-00:00'; |
|
| 67 | + $this->start_date = date('Y-m-d', strtotime($str)).'T00:00:00-00:00'; |
|
| 68 | 68 | return $this; |
| 69 | 69 | } |
| 70 | 70 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function to($str) |
| 77 | 77 | { |
| 78 | - $this->end_date = date('Y-m-d',strtotime($str)).'T00:00:00-00:00'; |
|
| 78 | + $this->end_date = date('Y-m-d', strtotime($str)).'T00:00:00-00:00'; |
|
| 79 | 79 | return $this; |
| 80 | 80 | } |
| 81 | 81 | /** |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | ]; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | - usort($result, function ($a, $b) { |
|
| 169 | + usort($result, function($a, $b) { |
|
| 170 | 170 | if ($a['date'] == $b['date']) { |
| 171 | 171 | return 0; |
| 172 | 172 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | } else { |
| 177 | 177 | $result = $response['items']; |
| 178 | 178 | |
| 179 | - usort($result, function ($a, $b) { |
|
| 179 | + usort($result, function($a, $b) { |
|
| 180 | 180 | if ($a['start']['date'] == $b['start']['date']) { |
| 181 | 181 | return 0; |
| 182 | 182 | } |