@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | $this->location = $this->location ?: self::DEFAULT_LOCATION; |
126 | - $this->required = (bool)$this->required; |
|
126 | + $this->required = (bool) $this->required; |
|
127 | 127 | |
128 | 128 | if (isset($data['items'])) { |
129 | 129 | $this->itemSchema = new Parameter($data['items']); |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | private function hasCorrectType($userValue) |
226 | 226 | { |
227 | 227 | // Helper fn to see whether an array is associative (i.e. a JSON object) |
228 | - $isAssociative = function ($value) { |
|
229 | - return is_array($value) && (bool)count(array_filter(array_keys($value), 'is_string')); |
|
228 | + $isAssociative = function($value) { |
|
229 | + return is_array($value) && (bool) count(array_filter(array_keys($value), 'is_string')); |
|
230 | 230 | }; |
231 | 231 | |
232 | 232 | // For params defined as objects, we'll let the user get away with |
@@ -177,7 +177,7 @@ |
||
177 | 177 | $limit = isset($userVals['limit']) ? $userVals : false; |
178 | 178 | $count = 0; |
179 | 179 | |
180 | - $totalReached = function ($count) use ($limit) { |
|
180 | + $totalReached = function($count) use ($limit) { |
|
181 | 181 | return $limit && $count >= $limit; |
182 | 182 | }; |
183 | 183 |
@@ -86,7 +86,7 @@ |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | if (!isset($options['authHandler'])) { |
89 | - $options['authHandler'] = function () use ($options) { |
|
89 | + $options['authHandler'] = function() use ($options) { |
|
90 | 90 | return $options['identityService']->generateToken($options); |
91 | 91 | }; |
92 | 92 | } |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | { |
14 | 14 | public static function httpErrors() |
15 | 15 | { |
16 | - return function (callable $handler) { |
|
17 | - return function ($request, array $options) use ($handler) { |
|
16 | + return function(callable $handler) { |
|
17 | + return function($request, array $options) use ($handler) { |
|
18 | 18 | return $handler($request, $options)->then( |
19 | - function (ResponseInterface $response) use ($request, $handler) { |
|
19 | + function(ResponseInterface $response) use ($request, $handler) { |
|
20 | 20 | if ($response->getStatusCode() < 400) { |
21 | 21 | return $response; |
22 | 22 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public static function authHandler(callable $tokenGenerator, Token $token = null) |
31 | 31 | { |
32 | - return function (callable $handler) use ($tokenGenerator, $token) { |
|
32 | + return function(callable $handler) use ($tokenGenerator, $token) { |
|
33 | 33 | return new AuthHandler($handler, $tokenGenerator, $token); |
34 | 34 | }; |
35 | 35 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $networksData = Utils::jsonDecode($response)['networks']; |
63 | 63 | |
64 | 64 | $networks = []; |
65 | - foreach($networksData as $resourceData) { |
|
65 | + foreach ($networksData as $resourceData) { |
|
66 | 66 | $resource = $this->newInstance(); |
67 | 67 | $resource->populateFromArray($resourceData); |
68 | 68 | $networks[] = $resource; |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $subnetsData = Utils::jsonDecode($response)['subnets']; |
88 | 88 | |
89 | 89 | $subnets = []; |
90 | - foreach($subnetsData as $resourceData) { |
|
90 | + foreach ($subnetsData as $resourceData) { |
|
91 | 91 | $resource = $this->newInstance(); |
92 | 92 | $resource->populateFromArray($resourceData); |
93 | 93 | $subnets[] = $resource; |