| @@ -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']); | 
| @@ -41,7 +41,7 @@ discard block | ||
| 41 | 41 | /** | 
| 42 | 42 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) | 
| 43 | 43 | * | 
| 44 | - * @param mixed $resource | |
| 44 | + * @param string $resource | |
| 45 | 45 | * @param string $type | 
| 46 | 46 | * | 
| 47 | 47 | * @return bool | 
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | /** | 
| 55 | 55 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) | 
| 56 | 56 | * | 
| 57 | - * @param mixed $resource | |
| 57 | + * @param string $resource | |
| 58 | 58 | * @param null $type | 
| 59 | 59 | * | 
| 60 | 60 | * @return RouteCollection | 
| @@ -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: | 
| @@ -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 | |
| @@ -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, | 
| @@ -25,6 +25,6 @@ | ||
| 25 | 25 | */ | 
| 26 | 26 | public function registerContainerConfiguration(LoaderInterface $loader) | 
| 27 | 27 |      { | 
| 28 | - $loader->load(__DIR__ . '/config_' . $this->getEnvironment() . '.yml'); | |
| 28 | + $loader->load(__DIR__.'/config_'.$this->getEnvironment().'.yml'); | |
| 29 | 29 | } | 
| 30 | 30 | } | 
| @@ -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; | 
| @@ -209,7 +209,7 @@ discard block | ||
| 209 | 209 | /** | 
| 210 | 210 | * Returns the History instance. | 
| 211 | 211 | * | 
| 212 | - * @return History A History instance | |
| 212 | + * @return \Symfony\Component\BrowserKit\History A History instance | |
| 213 | 213 | * | 
| 214 | 214 | * @api | 
| 215 | 215 | */ | 
| @@ -221,7 +221,7 @@ discard block | ||
| 221 | 221 | /** | 
| 222 | 222 | * Returns the CookieJar instance. | 
| 223 | 223 | * | 
| 224 | - * @return CookieJar A CookieJar instance | |
| 224 | + * @return \Symfony\Component\BrowserKit\CookieJar A CookieJar instance | |
| 225 | 225 | * | 
| 226 | 226 | * @api | 
| 227 | 227 | */ | 
| @@ -245,7 +245,7 @@ discard block | ||
| 245 | 245 | /** | 
| 246 | 246 | * Returns the current BrowserKit Response instance. | 
| 247 | 247 | * | 
| 248 | - * @return Response|null A BrowserKit Response instance | |
| 248 | + * @return \Symfony\Component\BrowserKit\Response|null A BrowserKit Response instance | |
| 249 | 249 | * | 
| 250 | 250 | * @api | 
| 251 | 251 | */ | 
| @@ -260,7 +260,7 @@ discard block | ||
| 260 | 260 | * The origin response is the response instance that is returned | 
| 261 | 261 | * by the code that handles requests. | 
| 262 | 262 | * | 
| 263 | - * @return object|null A response instance | |
| 263 | + * @return Response|null A response instance | |
| 264 | 264 | * | 
| 265 | 265 | * @see doRequest() | 
| 266 | 266 | * | 
| @@ -289,7 +289,7 @@ discard block | ||
| 289 | 289 | * The origin request is the request instance that is sent | 
| 290 | 290 | * to the code that handles requests. | 
| 291 | 291 | * | 
| 292 | - * @return object|null A Request instance | |
| 292 | + * @return \Symfony\Component\HttpFoundation\Request|null A Request instance | |
| 293 | 293 | * | 
| 294 | 294 | * @see doRequest() | 
| 295 | 295 | * | 
| @@ -370,7 +370,7 @@ discard block | ||
| 370 | 370 | * | 
| 371 | 371 | * @param Request $request The BrowserKit Request to filter | 
| 372 | 372 | * | 
| 373 | - * @return object An origin request instance | |
| 373 | + * @return \Symfony\Component\HttpFoundation\Request An origin request instance | |
| 374 | 374 | */ | 
| 375 | 375 | protected function filterRequest(Request $request) | 
| 376 | 376 |      { | 
| @@ -382,7 +382,7 @@ discard block | ||
| 382 | 382 | * | 
| 383 | 383 | * @param object $response The origin response to filter | 
| 384 | 384 | * | 
| 385 | - * @return Response An BrowserKit Response instance | |
| 385 | + * @return \Symfony\Component\BrowserKit\Response An BrowserKit Response instance | |
| 386 | 386 | */ | 
| 387 | 387 | protected function filterResponse($response) | 
| 388 | 388 |      { |