@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $missingFields = []; |
52 | 52 | |
53 | 53 | foreach ($requiredFields as $field) { |
54 | - if (! isset($params[$field])) { |
|
54 | + if (!isset($params[$field])) { |
|
55 | 55 | $missingFields[] = $field; |
56 | 56 | } |
57 | 57 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | public static function setName(Cfp $cfp, array $array) |
86 | 86 | { |
87 | - if (! isset($array['name'])) { |
|
87 | + if (!isset($array['name'])) { |
|
88 | 88 | throw new \InvalidArgumentException('Name has to be specified'); |
89 | 89 | } |
90 | 90 | $cfp->setName(filter_var($array['name'], FILTER_SANITIZE_STRING)); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | public static function setDateCfpStart(Cfp $cfp, array $array) |
94 | 94 | { |
95 | - if (! isset($array['dateCfpStart'])) { |
|
95 | + if (!isset($array['dateCfpStart'])) { |
|
96 | 96 | $array['dateCfpStart'] = '@0'; |
97 | 97 | } |
98 | 98 | $cfp->setDateCfpStart(new DateTimeImmutable($array['dateCfpStart'])); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | public static function setDateCfpEnd(Cfp $cfp, array $array) |
102 | 102 | { |
103 | - if (! isset($array['dateCfpEnd'])) { |
|
103 | + if (!isset($array['dateCfpEnd'])) { |
|
104 | 104 | throw new \InvalidArgumentException('CFP-EndDate has to be specified'); |
105 | 105 | } |
106 | 106 | $cfp->setDateCfpEnd(new DateTimeImmutable($array['dateCfpEnd'])); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | public static function setTimezone(Cfp $cfp, array $array) |
110 | 110 | { |
111 | - if (! isset($array['timezone'])) { |
|
111 | + if (!isset($array['timezone'])) { |
|
112 | 112 | throw new \InvalidArgumentException('Timezone has to be specified'); |
113 | 113 | } |
114 | 114 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | public static function setUri(Cfp $cfp, array $array) |
123 | 123 | { |
124 | - if (! isset($array['uri'])) { |
|
124 | + if (!isset($array['uri'])) { |
|
125 | 125 | throw new \InvalidArgumentException('URI has to be specified'); |
126 | 126 | } |
127 | 127 | |
@@ -130,19 +130,19 @@ discard block |
||
130 | 130 | |
131 | 131 | public static function setEventUri(Cfp $cfp, array $array, Client $client) |
132 | 132 | { |
133 | - if (! isset($array['eventUri'])) { |
|
133 | + if (!isset($array['eventUri'])) { |
|
134 | 134 | throw new \InvalidArgumentException('Event-URI has to be specified'); |
135 | 135 | } |
136 | 136 | |
137 | 137 | try { |
138 | 138 | $uri = ''; |
139 | 139 | $client->get($array['eventUri'], [ |
140 | - 'on_stats' => function (TransferStats $stats) use (&$uri) { |
|
140 | + 'on_stats' => function(TransferStats $stats) use (&$uri) { |
|
141 | 141 | $uri = $stats->getEffectiveUri(); |
142 | 142 | } |
143 | 143 | ]); |
144 | 144 | } catch (\Exception $e) { |
145 | - throw new \InvalidArgumentException('Event-URI could not be verified: ' . $e->getMessage()); |
|
145 | + throw new \InvalidArgumentException('Event-URI could not be verified: '.$e->getMessage()); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | $cfp->setEventUri(filter_var($uri, FILTER_VALIDATE_URL)); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | public static function setIconUri(Cfp $cfp, array $array) |
170 | 170 | { |
171 | - if (! isset($array['iconUri'])) { |
|
171 | + if (!isset($array['iconUri'])) { |
|
172 | 172 | return; |
173 | 173 | } |
174 | 174 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | public static function setDescription(Cfp $cfp, array $array) |
179 | 179 | { |
180 | - if (! isset($array['description'])) { |
|
180 | + if (!isset($array['description'])) { |
|
181 | 181 | return; |
182 | 182 | } |
183 | 183 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | public static function setLocation(Cfp $cfp, array $array) |
188 | 188 | { |
189 | - if (! isset($array['location'])) { |
|
189 | + if (!isset($array['location'])) { |
|
190 | 190 | return; |
191 | 191 | } |
192 | 192 | |
@@ -195,15 +195,15 @@ discard block |
||
195 | 195 | |
196 | 196 | public static function setGeolocation(Cfp $cfp, array $array) |
197 | 197 | { |
198 | - if (! isset($array['latitude'])) { |
|
198 | + if (!isset($array['latitude'])) { |
|
199 | 199 | return; |
200 | 200 | } |
201 | 201 | |
202 | - if (! isset($array['longitude'])) { |
|
202 | + if (!isset($array['longitude'])) { |
|
203 | 203 | return; |
204 | 204 | } |
205 | 205 | |
206 | - $latitude = filter_var( |
|
206 | + $latitude = filter_var( |
|
207 | 207 | $array['latitude'], |
208 | 208 | FILTER_SANITIZE_NUMBER_FLOAT, |
209 | 209 | FILTER_FLAG_ALLOW_FRACTION |
@@ -236,18 +236,18 @@ discard block |
||
236 | 236 | |
237 | 237 | public static function setTags(Cfp $cfp, array $array) |
238 | 238 | { |
239 | - if (! isset($array['tags'])) { |
|
239 | + if (!isset($array['tags'])) { |
|
240 | 240 | return; |
241 | 241 | } |
242 | 242 | |
243 | - $cfp->setTags(array_map(function ($item) { |
|
243 | + $cfp->setTags(array_map(function($item) { |
|
244 | 244 | return filter_var($item, FILTER_SANITIZE_STRING); |
245 | 245 | }, $array['tags'])); |
246 | 246 | } |
247 | 247 | |
248 | 248 | public static function setSource(Cfp $cfp, array $array) |
249 | 249 | { |
250 | - if (! isset($array['source'])) { |
|
250 | + if (!isset($array['source'])) { |
|
251 | 251 | return; |
252 | 252 | } |
253 | 253 |