| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 77 | public function getFormatValue($date) |
||
| 78 | { |
||
| 79 | if (!is_null($date)) { |
||
| 80 | if (!$date instanceof Carbon) { |
||
| 81 | $date = Carbon::parse($date); |
||
| 82 | } |
||
| 83 | |||
| 84 | $date->timezone($this->getTimezone()); |
||
| 85 | |||
| 86 | if ($this->getFormat() == 'humans') { |
||
| 87 | $date = $date->diffForHumans(); |
||
| 88 | } else { |
||
| 89 | $date = $date->format($this->getFormat()); |
||
| 90 | } |
||
| 91 | } |
||
| 92 | |||
| 93 | return $date; |
||
| 94 | } |
||
| 95 | } |
||
| 96 |