| Conditions | 8 |
| Paths | 16 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | function agoratime($date, $hour = 0, $min = 0, $sec = 0, $tz = '') |
||
| 40 | { |
||
| 41 | if (is_bool($hour) && $hour === true) { |
||
| 42 | $hour = $date->hour; |
||
| 43 | } |
||
| 44 | if (is_bool($min) && $min === true) { |
||
| 45 | $min = $date->minute; |
||
| 46 | } |
||
| 47 | if (is_bool($sec) && $sec === true) { |
||
| 48 | $sec = $date->second; |
||
| 49 | } |
||
| 50 | if (!$tz) { |
||
| 51 | $tz = /* @scrutinizer ignore-call */ timezone(); |
||
| 52 | } |
||
| 53 | $date1 = \Carbon\Carbon::create($date->year, $date->month, $date->day, $hour, $min, $sec, $tz); |
||
| 54 | |||
| 55 | return $date1->hour($hour)->minute($min)->second($sec); |
||
| 56 | } |
||
| 57 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.