| Total Complexity | 4 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class System |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var Bridge\Adapter |
||
| 24 | */ |
||
| 25 | protected $ba; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var TimeZone |
||
| 29 | */ |
||
| 30 | protected $timeZone; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param Bridge\Adapter $ba |
||
| 34 | */ |
||
| 35 | 8 | public function __construct(Bridge\Adapter $ba) |
|
| 39 | 8 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Get php DateTime helper object. |
||
| 43 | * |
||
| 44 | * @return TimeZone |
||
| 45 | */ |
||
| 46 | 1 | public function getTimeZone(): TimeZone |
|
| 47 | { |
||
| 48 | 1 | return $this->timeZone; |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Return system default timezone id. |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | 3 | public function getTimeZoneId(): string |
|
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Set system default timezone. |
||
| 63 | * |
||
| 64 | * @throws UnsupportedTzException |
||
| 65 | * @throws Bridge\Exception\JavaException |
||
| 66 | * |
||
| 67 | * @param string|Interfaces\JavaObject|\DateTimeZone $timezone timezone id, Java(java.util.Timezone) or php DateTimeZone |
||
| 68 | */ |
||
| 69 | 5 | public function setTimeZoneId($timezone): void |
|
| 74 |