| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.2098 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 58 | 2 | public function getStartDateTime(string $timezone = 'America/New_York'): ?\DateTime |
|
| 59 | { |
||
| 60 | 2 | if (!isset($this->extraArgs()['StartDateTime'])) { |
|
| 61 | 1 | return null; |
|
| 62 | } |
||
| 63 | |||
| 64 | try { |
||
| 65 | 1 | $startDateTime = new DateTime($this->extraArgs()['StartDateTime'], new DateTimeZone($timezone)); |
|
| 66 | |||
| 67 | 1 | return $startDateTime; |
|
| 68 | } catch (Throwable $e) { |
||
| 69 | return null; |
||
| 70 | } |
||
| 78 |