| Conditions | 5 |
| Paths | 5 |
| Total Lines | 27 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | private function isUserNew($date) |
||
| 22 | { |
||
| 23 | if (!$date) { |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | $register_year = $this->changeFormatDate($date, ['Y-m-d H:i:s', 'Y']); |
||
| 27 | $register_month = $this->changeFormatDate($date, ['Y-m-d H:i:s', 'm']); |
||
| 28 | $register_day = $this->changeFormatDate($date, ['Y-m-d H:i:s', 'd']); |
||
| 29 | |||
| 30 | $year = date('Y'); |
||
| 31 | $month = date('m'); |
||
| 32 | $day = date('d'); |
||
| 33 | |||
| 34 | $years = $year - $register_year; |
||
| 35 | |||
| 36 | if ($years === 0) { |
||
| 37 | $months = $month - $register_month; |
||
| 38 | |||
| 39 | if ($months === 0) { |
||
| 40 | $days = $day - $register_day; |
||
| 41 | |||
| 42 | if ($days < 1) { |
||
| 43 | return 1; |
||
| 44 | } |
||
| 45 | } |
||
| 46 | } |
||
| 47 | return 0; |
||
| 48 | } |
||
| 66 |