| Total Complexity | 6 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | trait DateFormat |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @return string |
||
| 9 | */ |
||
| 10 | public function getFormat() |
||
| 11 | { |
||
| 12 | if (is_null($this->format)) { |
||
| 13 | $this->format = config('sleeping_owl.datetimeFormat'); |
||
|
|
|||
| 14 | } |
||
| 15 | |||
| 16 | return $this->format; |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | public function getTimezone() |
||
| 23 | { |
||
| 24 | if (is_null($this->timezone)) { |
||
| 25 | $this->timezone = config('sleeping_owl.timezone'); |
||
| 26 | } |
||
| 27 | |||
| 28 | return $this->timezone; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string|null $format |
||
| 33 | * |
||
| 34 | * @return $this |
||
| 35 | */ |
||
| 36 | public function setFormat($format) |
||
| 37 | { |
||
| 38 | $this->format = $format; |
||
| 39 | |||
| 40 | return $this; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $timezone |
||
| 45 | * |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | public function setTimezone($timezone) |
||
| 53 | } |
||
| 54 | } |
||
| 55 |