@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | { |
| 219 | 219 | $date = $this->makeDate("{$year}-{$month}-{$day}"); |
| 220 | 220 | $lunar = $this->solar2lunar($year, $month, $day, $hour); |
| 221 | - $week = abs((int)$date->format('w')); // 0 ~ 6 修正 星期七 为 星期日 |
|
| 221 | + $week = abs((int) $date->format('w')); // 0 ~ 6 修正 星期七 为 星期日 |
|
| 222 | 222 | |
| 223 | 223 | return array_merge( |
| 224 | 224 | $lunar, |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | if ($no < 1 || $no > 24) { |
| 435 | 435 | return -1; |
| 436 | 436 | } |
| 437 | - $solarTermsOfYear = array_map('hexdec', (array)str_split($this->solarTerms[$year - 1900], 5)); |
|
| 437 | + $solarTermsOfYear = array_map('hexdec', (array) str_split($this->solarTerms[$year - 1900], 5)); |
|
| 438 | 438 | $positions = [ |
| 439 | 439 | 0 => [0, 1], |
| 440 | 440 | 1 => [1, 2], |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | throw new InvalidArgumentException("不支持的日期:{$year}-{$month}-{$day}"); |
| 599 | 599 | } |
| 600 | 600 | |
| 601 | - $offset = (int)$this->dateDiff($date, '1900-01-31')->days; |
|
| 601 | + $offset = (int) $this->dateDiff($date, '1900-01-31')->days; |
|
| 602 | 602 | |
| 603 | 603 | for ($i = 1900; $i < 2101 && $offset > 0; ++$i) { |
| 604 | 604 | $daysOfYear = $this->daysOfYear($i); |
@@ -1117,7 +1117,7 @@ discard block |
||
| 1117 | 1117 | $date = $this->makeDate("{$solar['solar_year']}-{$solar['solar_month']}-{$solar['solar_day']}"); |
| 1118 | 1118 | $date->modify($value.' day'); |
| 1119 | 1119 | |
| 1120 | - return $this->solar2lunar((int)$date->format('Y'), (int)$date->format('m'), (int)$date->format('d')); |
|
| 1120 | + return $this->solar2lunar((int) $date->format('Y'), (int) $date->format('m'), (int) $date->format('d')); |
|
| 1121 | 1121 | } |
| 1122 | 1122 | |
| 1123 | 1123 | /** |