| Conditions | 7 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 8.8142 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 5 | public static function getCurrentSeason() |
|
| 13 | { |
||
| 14 | 5 | $now = Carbon::now()->month; |
|
| 15 | |||
| 16 | 5 | if (1 <= $now && $now <= 3) { |
|
| 17 | return self::WINTER; |
||
| 18 | 5 | } elseif (4 <= $now && $now <= 6) { |
|
| 19 | return self::SPRING; |
||
| 20 | 5 | } elseif (7 <= $now && $now <= 9) { |
|
| 21 | 5 | return self::SUMMER; |
|
| 22 | } |
||
| 23 | |||
| 24 | return self::FALL; |
||
| 25 | } |
||
| 26 | |||
| 66 |