@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | { |
143 | 143 | foreach ($this->definition->parameters as $i => $paramDefinition) { |
144 | 144 | if ($paramDefinition->name === $parameterName) { |
145 | - return '/' . implode('/', [ |
|
145 | + return '/'.implode('/', [ |
|
146 | 146 | 'paths', |
147 | 147 | str_replace(['~', '/'], ['~0', '~1'], $this->getPath()), |
148 | 148 | $this->getMethod(), |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | { |
194 | 194 | $segment = str_replace(['~0', '~1'], ['~', '/'], array_shift($segments)); |
195 | 195 | if (property_exists($context, $segment)) { |
196 | - $pointer .= '/' . $segment; |
|
196 | + $pointer .= '/'.$segment; |
|
197 | 197 | if (!count($segments)) { |
198 | 198 | return $pointer; |
199 | 199 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | ->willReturn((object)[]); |
81 | 81 | |
82 | 82 | $this->loader->load(self::DOCUMENT_PATH); |
83 | - $this->loader->load(self::DOCUMENT_PATH . '2'); |
|
83 | + $this->loader->load(self::DOCUMENT_PATH.'2'); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | ->willReturn($pathDefinitions); |
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 | |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $definitionPaths = array_keys((array)$pathDefinitions); |
355 | 355 | sort($definitionPaths); |
356 | 356 | |
357 | - $routePaths = array_map(function (Route $route) { |
|
357 | + $routePaths = array_map(function(Route $route) { |
|
358 | 358 | return $route->getPath(); |
359 | 359 | }, $routes->getIterator()->getArrayCopy()); |
360 | 360 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $this->typeResolverMock |
41 | 41 | ->expects($this->any()) |
42 | 42 | ->method('resolveUsingSchema') |
43 | - ->willReturnCallback(function (\stdClass $schema) { |
|
43 | + ->willReturnCallback(function(\stdClass $schema) { |
|
44 | 44 | return "KleijnWeb\\SwaggerBundle\\Tests\\Serialize\\Serializer\\Stubs\\$schema->class"; |
45 | 45 | }); |
46 | 46 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | public static function setUpBeforeClass() |
30 | 30 | { |
31 | - static::initSchemaManager(__DIR__ . '/PetStore/app/swagger/petstore.yml'); |
|
31 | + static::initSchemaManager(__DIR__.'/PetStore/app/swagger/petstore.yml'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -47,18 +47,18 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function serialize($data): string |
49 | 49 | { |
50 | - $export = function ($object) use (&$export) { |
|
50 | + $export = function($object) use (&$export) { |
|
51 | 51 | if (!is_object($object)) { |
52 | 52 | return $object; |
53 | 53 | } |
54 | 54 | $class = get_class($object); |
55 | 55 | $data = (array)$object; |
56 | 56 | $offset = strlen($class) + 2; |
57 | - $keys = array_map(function ($k) use ($offset) { |
|
57 | + $keys = array_map(function($k) use ($offset) { |
|
58 | 58 | return substr($k, $offset); |
59 | 59 | }, array_keys($data)); |
60 | 60 | |
61 | - return array_map(function ($item) use ($offset, &$export) { |
|
61 | + return array_map(function($item) use ($offset, &$export) { |
|
62 | 62 | return is_object($item) ? $export($item) : (is_array($item) ? array_map($export, $item) : $item); |
63 | 63 | }, array_combine($keys, array_values($data))); |
64 | 64 | }; |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function deserialize($data, string $type) |
76 | 76 | { |
77 | - $import = function ($item, \stdClass $schema) use (&$import) { |
|
77 | + $import = function($item, \stdClass $schema) use (&$import) { |
|
78 | 78 | switch ($schema->type) { |
79 | 79 | case 'array': |
80 | - return array_map(function ($value) use (&$import, $schema) { |
|
80 | + return array_map(function($value) use (&$import, $schema) { |
|
81 | 81 | return $import($value, $schema->items); |
82 | 82 | }, $item); |
83 | 83 | case 'object': |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | protected function qualify(string $resourceNamespace, string $typeName): string |
55 | 55 | { |
56 | - return ltrim($resourceNamespace . '\\' . $typeName, '\\'); |
|
56 | + return ltrim($resourceNamespace.'\\'.$typeName, '\\'); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -10,7 +10,6 @@ |
||
10 | 10 | |
11 | 11 | use KleijnWeb\SwaggerBundle\Response\Error\HttpError; |
12 | 12 | use KleijnWeb\SwaggerBundle\Response\Error\LogRefBuilder; |
13 | -use KleijnWeb\SwaggerBundle\Response\ErrorResponseFactory; |
|
14 | 13 | use Psr\Log\LogLevel; |
15 | 14 | use Symfony\Component\HttpFoundation\Request; |
16 | 15 |