@@ -31,8 +31,7 @@ |
||
| 31 | 31 | { |
| 32 | 32 | try { |
| 33 | 33 | $this->phpDateTime = new PhpDateTime($dateString); |
| 34 | - } |
|
| 35 | - catch (PhpException $exception) { |
|
| 34 | + } catch (PhpException $exception) { |
|
| 36 | 35 | // Suspect it is a unixtime that could not be parsed. |
| 37 | 36 | $this->phpDateTime = new PhpDateTime(); |
| 38 | 37 | $this->phpDateTime->setTimestamp($dateString); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | } catch (Exception $exception) { |
| 51 | - throw new Exception('Cannot construct instance of'.__CLASS__.' with parameter "'.$monthString.'". Reason: ' . $exception->getMessage()); |
|
| 51 | + throw new Exception('Cannot construct instance of' . __CLASS__ . ' with parameter "' . $monthString . '". Reason: ' . $exception->getMessage()); |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function getBegin() |
| 174 | 174 | { |
| 175 | - $start = new DateTimeImmutable($this->getYearMonthString().'-01 00:00:00'); |
|
| 175 | + $start = new DateTimeImmutable($this->getYearMonthString() . '-01 00:00:00'); |
|
| 176 | 176 | |
| 177 | 177 | return $start; |
| 178 | 178 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | public function getFirstDay() |
| 198 | 198 | { |
| 199 | - $firstDayOfMonth = new DateTimeImmutable($this->getYearMonthString().'-01 00:00:00'); |
|
| 199 | + $firstDayOfMonth = new DateTimeImmutable($this->getYearMonthString() . '-01 00:00:00'); |
|
| 200 | 200 | |
| 201 | 201 | return $firstDayOfMonth; |
| 202 | 202 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | |
| 259 | 259 | private function buildYearMonthString($year, $month) |
| 260 | 260 | { |
| 261 | - $yearMonthString = $year.'-'.str_pad($month, 2, '0', STR_PAD_LEFT); |
|
| 261 | + $yearMonthString = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT); |
|
| 262 | 262 | |
| 263 | 263 | return $yearMonthString; |
| 264 | 264 | } |