@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * @throws InvalidArgumentException |
27 | 27 | */ |
28 | - public function first_performance_date(string $timezone = 'America/New_York'): DateTime|bool |
|
28 | + public function first_performance_date(string $timezone = 'America/New_York'): DateTime | bool |
|
29 | 29 | { |
30 | 30 | try { |
31 | 31 | $timezone = new DateTimeZone($timezone); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * @throws InvalidArgumentException |
49 | 49 | */ |
50 | - public function last_performance_date(string $timezone = 'America/New_York'): DateTime|bool |
|
50 | + public function last_performance_date(string $timezone = 'America/New_York'): DateTime | bool |
|
51 | 51 | { |
52 | 52 | try { |
53 | 53 | $timezone = new DateTimeZone($timezone); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | trigger_error($exception->getMessage(), E_USER_WARNING); |
15 | 15 | } |
16 | 16 | |
17 | - if(isset($this->extra_args()['CreatedDateTime'])) { |
|
17 | + if (isset($this->extra_args()['CreatedDateTime'])) { |
|
18 | 18 | try { |
19 | 19 | return new DateTime($this->extra_args()['CreatedDateTime'], $timezone); |
20 | 20 | } catch (\Exception $e) { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | function description(): string |
29 | 29 | { |
30 | - return (string)$this->extra_args()['Description']; |
|
30 | + return (string) $this->extra_args()['Description']; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | function endDateTime($timezone = 'America/New_York') : ?DateTime |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | trigger_error($exception->getMessage(), E_USER_WARNING); |
39 | 39 | } |
40 | 40 | |
41 | - if(isset( $this->extra_args()['EndDateTime'])) { |
|
41 | + if (isset($this->extra_args()['EndDateTime'])) { |
|
42 | 42 | try { |
43 | - return new \DateTime( $this->extra_args()['EndDateTime'], $timezone ); |
|
43 | + return new \DateTime($this->extra_args()['EndDateTime'], $timezone); |
|
44 | 44 | } catch (\Exception $exception) { |
45 | 45 | trigger_error($exception->getMessage(), E_USER_WARNING); |
46 | 46 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | if (isset($this->extra_args()['StartDateTime'])) { |
66 | 66 | try { |
67 | - return new \DateTime( $this->extra_args()['StartDateTime'], $timezone ); |
|
67 | + return new \DateTime($this->extra_args()['StartDateTime'], $timezone); |
|
68 | 68 | } catch (\Exception $e) { |
69 | 69 | trigger_error($e->getMessage(), E_USER_WARNING); |
70 | 70 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $response = $this->client->get(self::RESOURCE); |
51 | 51 | $data = json_decode($response->getBody()->getContents(), true); |
52 | 52 | |
53 | - return array_map( function(array $season) { |
|
53 | + return array_map(function(array $season) { |
|
54 | 54 | return new Season($season); |
55 | 55 | }, $data); |
56 | 56 | } catch (GuzzleException $e) { |
@@ -9,38 +9,38 @@ |
||
9 | 9 | |
10 | 10 | protected array $_extra_args = []; |
11 | 11 | |
12 | - public function __construct( array $args = [] ) { |
|
12 | + public function __construct(array $args = []) { |
|
13 | 13 | |
14 | - $this->_set_state( $args ); |
|
14 | + $this->_set_state($args); |
|
15 | 15 | |
16 | 16 | } |
17 | 17 | |
18 | - protected function _set_state( array $args = [] ) : void { |
|
18 | + protected function _set_state(array $args = []) : void { |
|
19 | 19 | |
20 | - foreach ( $args as $key => $value ) { |
|
20 | + foreach ($args as $key => $value) { |
|
21 | 21 | $property = "_{$key}"; |
22 | 22 | |
23 | - switch ( property_exists ( $this, $property ) ) { |
|
23 | + switch (property_exists($this, $property)) { |
|
24 | 24 | case true : |
25 | 25 | $this->{$property} = $value; |
26 | 26 | break; |
27 | 27 | default : |
28 | - $this->_extra_args[ $key ] = $value; |
|
28 | + $this->_extra_args[$key] = $value; |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | 32 | } |
33 | 33 | |
34 | - public function __call( string $name, array $args = [] ) { |
|
34 | + public function __call(string $name, array $args = []) { |
|
35 | 35 | |
36 | 36 | $property = "_{$name}"; |
37 | 37 | |
38 | - if ( property_exists ( $this, $property ) ) { |
|
38 | + if (property_exists($this, $property)) { |
|
39 | 39 | return $this->{$property}; |
40 | 40 | } |
41 | 41 | |
42 | - if ( isset ( $this->_extra_args[ $name ] ) ) { |
|
43 | - return $this->_extra_args[ $name ]; |
|
42 | + if (isset ($this->_extra_args[$name])) { |
|
43 | + return $this->_extra_args[$name]; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | return false; |