@@ -172,10 +172,10 @@ |
||
172 | 172 | |
173 | 173 | // Set property type |
174 | 174 | if (isset($propertyConfig['type'])) { |
175 | - $propertyMetadata->setType((string)$propertyConfig['type']); |
|
175 | + $propertyMetadata->setType((string) $propertyConfig['type']); |
|
176 | 176 | |
177 | 177 | if (isset($propertyConfig['type_class'])) { |
178 | - $propertyMetadata->setTypeClass((string)$propertyConfig['type_class']); |
|
178 | + $propertyMetadata->setTypeClass((string) $propertyConfig['type_class']); |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function visitString($data, array $config) |
40 | 40 | { |
41 | - return (string)$data; |
|
41 | + return (string) $data; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -49,17 +49,17 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function visitBoolean($data, array $config) |
51 | 51 | { |
52 | - return (bool)$data; |
|
52 | + return (bool) $data; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | public function visitInteger($data, array $config) |
56 | 56 | { |
57 | - return (int)$data; |
|
57 | + return (int) $data; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | public function visitDouble($data, array $config) |
61 | 61 | { |
62 | - return (float)$data; |
|
62 | + return (float) $data; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | public function visitDate($data, array $config) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function visitString($data, array $config) |
43 | 43 | { |
44 | - return (string)$data; |
|
44 | + return (string) $data; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -52,17 +52,17 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function visitBoolean($data, array $config) |
54 | 54 | { |
55 | - return (bool)$data; |
|
55 | + return (bool) $data; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | public function visitInteger($data, array $config) |
59 | 59 | { |
60 | - return (int)$data; |
|
60 | + return (int) $data; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | public function visitDouble($data, array $config) |
64 | 64 | { |
65 | - return (float)$data; |
|
65 | + return (float) $data; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | public function visitDate($data, array $config) |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function visitTime($data, array $config) |
99 | 99 | { |
100 | - $inSeconds = (int)$data; |
|
100 | + $inSeconds = (int) $data; |
|
101 | 101 | |
102 | 102 | $hours = floor($inSeconds / 3600); |
103 | 103 | $minutes = floor($inSeconds / 60 % 60); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | { |
142 | 142 | try { |
143 | 143 | if (is_int($date)) { |
144 | - $normalizedDate = $this->normalizeDateFormat((string)$date); |
|
144 | + $normalizedDate = $this->normalizeDateFormat((string) $date); |
|
145 | 145 | $convertedDate = DateTime::createFromFormat( |
146 | 146 | 'U.u', |
147 | 147 | $normalizedDate |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | if (false === $convertedDate) { |
151 | 151 | throw new TransformationFailedException( |
152 | - sprintf('Date "%s" could not be converted to a DateTime object', (string)$date) |
|
152 | + sprintf('Date "%s" could not be converted to a DateTime object', (string) $date) |
|
153 | 153 | ); |
154 | 154 | } |
155 | 155 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | return new DateTime($date); |
160 | 160 | } catch (\Exception $exception) { |
161 | 161 | throw new TransformationFailedException( |
162 | - sprintf('Date "%s" could not be converted to a DateTime object', (string)$date), |
|
162 | + sprintf('Date "%s" could not be converted to a DateTime object', (string) $date), |
|
163 | 163 | 0, |
164 | 164 | $exception |
165 | 165 | ); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | case 'time': |
85 | 85 | return $visitor->visitTime($data, $config); |
86 | 86 | case 'array': |
87 | - return $visitor->visitArray((array)$data, $config); |
|
87 | + return $visitor->visitArray((array) $data, $config); |
|
88 | 88 | case 'object': |
89 | 89 | return $visitor->visitObject($data, $config); |
90 | 90 | } |
@@ -149,6 +149,6 @@ discard block |
||
149 | 149 | */ |
150 | 150 | protected function isTimeFormat($string): bool |
151 | 151 | { |
152 | - return (bool)preg_match('/^(?:2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]$/', $string); |
|
152 | + return (bool) preg_match('/^(?:2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]$/', $string); |
|
153 | 153 | } |
154 | 154 | } |