| Conditions | 5 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5.2742 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | { |
||
| 31 | try { |
||
| 32 | 4 | $timezone = new DateTimeZone($timezone); |
|
| 33 | 1 | } catch (Exception $e) { |
|
| 34 | 1 | throw new InvalidArgumentException($e->getMessage()); |
|
| 35 | } |
||
| 36 | |||
| 37 | 3 | $date = isset($this->response()['FirstPerformanceDate']) ? $this->response()['FirstPerformanceDate'] : false; |
|
| 38 | 3 | if ($date) { |
|
| 39 | try { |
||
| 40 | 2 | return DateTime::createFromFormat(' Y-m-d\TG:i:sp', $date, $timezone); |
|
| 41 | } catch (Exception $e) { |
||
| 42 | trigger_error($e->getMessage(), E_USER_ERROR); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 46 | 1 | return false; |
|
| 47 | } |
||
| 80 |