@@ -50,7 +50,7 @@ |
||
50 | 50 | ->scalarNode('base_url')->defaultValue('/')->end() |
51 | 51 | ->scalarNode('host')->defaultNull()->end() |
52 | 52 | ->end() |
53 | - ->end() |
|
53 | + ->end() |
|
54 | 54 | ->end() |
55 | 55 | ->end() |
56 | 56 | ->end() |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\SwaggerBundle package. |
4 | 4 | * |
@@ -37,7 +37,7 @@ discard block |
||
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() |
@@ -10,12 +10,8 @@ |
||
10 | 10 | |
11 | 11 | use KleijnWeb\SwaggerBundle\Response\Error\HttpError; |
12 | 12 | use KleijnWeb\SwaggerBundle\Response\Error\LogRefBuilder; |
13 | -use KleijnWeb\SwaggerBundle\EventListener\ExceptionListener; |
|
14 | -use KleijnWeb\SwaggerBundle\Response\ErrorResponseFactory; |
|
15 | -use Psr\Log\LoggerInterface; |
|
16 | 13 | use Psr\Log\LogLevel; |
17 | 14 | use Symfony\Component\HttpFoundation\Request; |
18 | -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; |
|
19 | 15 | |
20 | 16 | /** |
21 | 17 | * @author John Kleijn <[email protected]> |
@@ -8,8 +8,6 @@ |
||
8 | 8 | |
9 | 9 | namespace KleijnWeb\SwaggerBundle\Tests\Response\ErrorResponseFactory; |
10 | 10 | |
11 | -use JsonSchema\Validator; |
|
12 | -use KleijnWeb\SwaggerBundle\Document\ParameterRefBuilder; |
|
13 | 11 | use KleijnWeb\SwaggerBundle\Exception\InvalidParametersException; |
14 | 12 | use KleijnWeb\SwaggerBundle\Response\Error\HttpError; |
15 | 13 | use KleijnWeb\SwaggerBundle\Response\Error\LogRefBuilder; |
@@ -31,6 +31,7 @@ |
||
31 | 31 | * @param float $b |
32 | 32 | * @param Meh $meh |
33 | 33 | * @param Meh[] ...$mehs |
34 | + * @param Meh $mehs |
|
34 | 35 | */ |
35 | 36 | public function __construct(float $b, Meh $meh, Meh ...$mehs) |
36 | 37 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | public function load(array $configs, ContainerBuilder $container) |
26 | 26 | { |
27 | 27 | $config = $this->processConfiguration(new Configuration(), $configs); |
28 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
28 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
29 | 29 | $loader->load('services.yml'); |
30 | 30 | |
31 | 31 | $container->setParameter('swagger.document.base_path', $config['document']['base_path']); |
@@ -24,10 +24,10 @@ |
||
24 | 24 | public function create(Request $request, \Exception $exception): string; |
25 | 25 | } |
26 | 26 | |
27 | - class CustomLogRefBuilder implements LogRefBuilder |
|
28 | - { |
|
29 | - public function create(Request $request, \Exception $exception): string |
|
30 | - { |
|
31 | - return uniqid("{$request->headers->get('x-request-id')}_{$exception->getCode()}_"); |
|
32 | - } |
|
33 | - } |
|
34 | 27 | \ No newline at end of file |
28 | + class CustomLogRefBuilder implements LogRefBuilder |
|
29 | + { |
|
30 | + public function create(Request $request, \Exception $exception): string |
|
31 | + { |
|
32 | + return uniqid("{$request->headers->get('x-request-id')}_{$exception->getCode()}_"); |
|
33 | + } |
|
34 | + } |
|
35 | 35 | \ No newline at end of file |
@@ -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 | /** |