@@ -37,7 +37,7 @@ |
||
37 | 37 | ->arrayNode('namespace') |
38 | 38 | ->beforeNormalization() |
39 | 39 | ->ifString() |
40 | - ->then(function ($v) { |
|
40 | + ->then(function($v) { |
|
41 | 41 | return [$v]; |
42 | 42 | }) |
43 | 43 | ->end() |
@@ -303,7 +303,7 @@ |
||
303 | 303 | { |
304 | 304 | /** |
305 | 305 | * @param array $attributes |
306 | - * @param array $content |
|
306 | + * @param string $content |
|
307 | 307 | */ |
308 | 308 | public function __construct(array $attributes, $content) |
309 | 309 | { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $this->parametersAssemblerMock |
158 | 158 | ->expects($this->once()) |
159 | 159 | ->method('assemble') |
160 | - ->willReturnCallback(function ( |
|
160 | + ->willReturnCallback(function( |
|
161 | 161 | Operation $operation, |
162 | 162 | array $query, |
163 | 163 | array $attributes, |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $this->parametersAssemblerMock |
196 | 196 | ->expects($this->once()) |
197 | 197 | ->method('assemble') |
198 | - ->willReturnCallback(function ( |
|
198 | + ->willReturnCallback(function( |
|
199 | 199 | Operation $operation, |
200 | 200 | array $query, |
201 | 201 | array $attributes, |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | ->expects($this->once()) |
212 | 212 | ->method('hydrate') |
213 | 213 | ->with($body, $this->isInstanceOf(Schema::class)) |
214 | - ->willReturnCallback(function () use ($dto) { |
|
214 | + ->willReturnCallback(function() use ($dto) { |
|
215 | 215 | return $dto; |
216 | 216 | }); |
217 | 217 |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @param int $id |
74 | 74 | * @param \stdClass $data |
75 | 75 | * |
76 | - * @return array |
|
76 | + * @return \stdClass |
|
77 | 77 | */ |
78 | 78 | public function put(string $type, int $id, \stdClass $data) |
79 | 79 | { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param string $type |
88 | 88 | * @param \stdClass $data |
89 | 89 | * |
90 | - * @return array |
|
90 | + * @return \stdClass |
|
91 | 91 | */ |
92 | 92 | public function post(string $type, \stdClass $data) |
93 | 93 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ->willReturn([]); |
85 | 85 | |
86 | 86 | $this->loader->load(self::DOCUMENT_PATH); |
87 | - $this->loader->load(self::DOCUMENT_PATH . '2'); |
|
87 | + $this->loader->load(self::DOCUMENT_PATH.'2'); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | ]); |
101 | 101 | |
102 | 102 | $routes1 = $this->loader->load(self::DOCUMENT_PATH); |
103 | - $routes2 = $this->loader->load(self::DOCUMENT_PATH . '2'); |
|
103 | + $routes2 = $this->loader->load(self::DOCUMENT_PATH.'2'); |
|
104 | 104 | $this->assertSame(count($routes1), count(array_diff_key($routes1->all(), $routes2->all()))); |
105 | 105 | } |
106 | 106 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $this->decriptionMock |
262 | 262 | ->expects($this->atLeast(1)) |
263 | 263 | ->method('getExtension') |
264 | - ->willReturnCallback(function (string $name) use ($diKey) { |
|
264 | + ->willReturnCallback(function(string $name) use ($diKey) { |
|
265 | 265 | return $name == 'router-controller' ? $diKey : null; |
266 | 266 | }); |
267 | 267 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $this->decriptionMock |
288 | 288 | ->expects($this->atLeast(1)) |
289 | 289 | ->method('getExtension') |
290 | - ->willReturnCallback(function (string $name) use ($router) { |
|
290 | + ->willReturnCallback(function(string $name) use ($router) { |
|
291 | 291 | return $name == 'router' ? $router : null; |
292 | 292 | }); |
293 | 293 | |
@@ -328,13 +328,13 @@ discard block |
||
328 | 328 | public function routeCollectionWillContainPathFromDescription() |
329 | 329 | { |
330 | 330 | $paths = [ |
331 | - new Path('/a', [new Operation('/a:get', '/a', 'get'),]), |
|
332 | - new Path('/a/b', [new Operation('/a/b:get', '/a/b', 'get'),]), |
|
331 | + new Path('/a', [new Operation('/a:get', '/a', 'get'), ]), |
|
332 | + new Path('/a/b', [new Operation('/a/b:get', '/a/b', 'get'), ]), |
|
333 | 333 | new Path('/a/b/c', [new Operation('/a/b/c:get', '/a/b/c', 'get')]), |
334 | 334 | new Path('/d/f/g', [new Operation('/d/f/g:get', '/d/f/g', 'get')]), |
335 | 335 | new Path('/1/2/3', [new Operation('/1/2/3:get', '/1/2/3', 'get')]), |
336 | 336 | new Path('/foo/{bar}/{blah}', [new Operation('/foo/{bar}/{blah}:get', '/foo/{bar}/{blah}', 'get')]), |
337 | - new Path('/z', [new Operation('/z:get', '/z', 'get'),]), |
|
337 | + new Path('/z', [new Operation('/z:get', '/z', 'get'), ]), |
|
338 | 338 | ]; |
339 | 339 | |
340 | 340 | $this->decriptionMock |
@@ -344,12 +344,12 @@ discard block |
||
344 | 344 | |
345 | 345 | $routes = $this->loader->load(self::DOCUMENT_PATH); |
346 | 346 | |
347 | - $descriptionPaths = array_map(function (Path $path) { |
|
347 | + $descriptionPaths = array_map(function(Path $path) { |
|
348 | 348 | return $path->getPath(); |
349 | 349 | }, $paths); |
350 | 350 | sort($descriptionPaths); |
351 | 351 | |
352 | - $routePaths = array_map(function (Route $route) { |
|
352 | + $routePaths = array_map(function(Route $route) { |
|
353 | 353 | return $route->getPath(); |
354 | 354 | }, $routes->getIterator()->getArrayCopy()); |
355 | 355 | |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | */ |
389 | 389 | public function willAddRequirementsForStringPatternParams() |
390 | 390 | { |
391 | - $expected = '\d{2}hello'; |
|
391 | + $expected = '\d{2}hello'; |
|
392 | 392 | $parameter = new Parameter( |
393 | 393 | 'aString', |
394 | 394 | true, |
@@ -59,7 +59,7 @@ |
||
59 | 59 | { |
60 | 60 | $id = rand(); |
61 | 61 | |
62 | - $responseData = $this->get('/v2/pet/' . $id); |
|
62 | + $responseData = $this->get('/v2/pet/'.$id); |
|
63 | 63 | |
64 | 64 | $this->assertSame($id, $responseData->id); |
65 | 65 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | public function canFindByCriteria() |
63 | 63 | { |
64 | - $criteria = [ |
|
64 | + $criteria = [ |
|
65 | 65 | (object)[ |
66 | 66 | 'fieldName' => 'x', |
67 | 67 | 'operator' => 'eq', |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $this->assertSame( |
165 | 165 | JSON_ERROR_NONE, |
166 | 166 | json_last_error(), |
167 | - "Not valid JSON: " . json_last_error_msg() . "(" . var_export($content, true) . ")" |
|
167 | + "Not valid JSON: ".json_last_error_msg()."(".var_export($content, true).")" |
|
168 | 168 | ); |
169 | 169 | } |
170 | 170 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | $uri = $path; |
201 | 201 | if (count($params)) { |
202 | - $uri = $path . '?' . http_build_query($params); |
|
202 | + $uri = $path.'?'.http_build_query($params); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | return $uri; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $router, |
91 | 91 | $routerController |
92 | 92 | ); |
93 | - $defaults = [ |
|
93 | + $defaults = [ |
|
94 | 94 | '_controller' => $controllerKey, |
95 | 95 | RequestMeta::ATTRIBUTE_URI => $resource, |
96 | 96 | RequestMeta::ATTRIBUTE_PATH => $pathItem->getPath() |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | if ($pattern = $schema->getPattern()) { |
129 | 129 | $requirements[$parameter->getName()] = $pattern; |
130 | 130 | } elseif ($enum = $schema->getEnum()) { |
131 | - $requirements[$parameter->getName()] = '(' . implode('|', $enum) . ')'; |
|
131 | + $requirements[$parameter->getName()] = '('.implode('|', $enum).')'; |
|
132 | 132 | } |
133 | 133 | break; |
134 | 134 | default: |