@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 26 | 26 | * @param Request $request |
| 27 | 27 | * |
| 28 | - * @return array |
|
| 28 | + * @return Response |
|
| 29 | 29 | */ |
| 30 | 30 | public function foobarAction(Request $request) |
| 31 | 31 | { |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | class FooBundle extends Bundle |
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | - * @return ExtensionInterface |
|
| 23 | + * @return boolean |
|
| 24 | 24 | */ |
| 25 | 25 | public function getContainerExtension() |
| 26 | 26 | { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->eventMock |
| 64 | 64 | ->expects($this->once()) |
| 65 | 65 | ->method('setResponse') |
| 66 | - ->with($this->callback(function (Response $response) { |
|
| 66 | + ->with($this->callback(function(Response $response) { |
|
| 67 | 67 | return $response->getStatusCode() === Response::HTTP_METHOD_NOT_ALLOWED; |
| 68 | 68 | })); |
| 69 | 69 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $this->eventMock |
| 83 | 83 | ->expects($this->once()) |
| 84 | 84 | ->method('setResponse') |
| 85 | - ->with($this->callback(function (Response $response) { |
|
| 85 | + ->with($this->callback(function(Response $response) { |
|
| 86 | 86 | return $response->getStatusCode() === Response::HTTP_NOT_MODIFIED; |
| 87 | 87 | })); |
| 88 | 88 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $this->eventMock |
| 133 | 133 | ->expects($this->once()) |
| 134 | 134 | ->method('setResponse') |
| 135 | - ->with($this->callback(function (Response $response) { |
|
| 135 | + ->with($this->callback(function(Response $response) { |
|
| 136 | 136 | return $response->getStatusCode() === Response::HTTP_PRECONDITION_REQUIRED; |
| 137 | 137 | })); |
| 138 | 138 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $this->eventMock |
| 153 | 153 | ->expects($this->once()) |
| 154 | 154 | ->method('setResponse') |
| 155 | - ->with($this->callback(function (Response $response) { |
|
| 155 | + ->with($this->callback(function(Response $response) { |
|
| 156 | 156 | return $response->getStatusCode() === Response::HTTP_PRECONDITION_FAILED; |
| 157 | 157 | })); |
| 158 | 158 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @param Request $request |
| 90 | 90 | * @param string $version |
| 91 | 91 | * |
| 92 | - * @return mixed |
|
| 92 | + * @return string |
|
| 93 | 93 | */ |
| 94 | 94 | public function update(Request $request, $version) |
| 95 | 95 | { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * @param Request $request |
| 123 | 123 | * @param string $version |
| 124 | 124 | * |
| 125 | - * @return mixed |
|
| 125 | + * @return string |
|
| 126 | 126 | */ |
| 127 | 127 | public function register(Request $request, $version) |
| 128 | 128 | { |
@@ -192,14 +192,14 @@ discard block |
||
| 192 | 192 | $key = $request->getPathInfo(); |
| 193 | 193 | $segments = explode('/', ltrim($key, '/')); |
| 194 | 194 | if ($query = $request->getQueryString()) { |
| 195 | - $segments[] = '?' . $query; |
|
| 195 | + $segments[] = '?'.$query; |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - array_walk($segments, function (&$value) { |
|
| 198 | + array_walk($segments, function(&$value) { |
|
| 199 | 199 | $value = preg_replace('/[^[:print:]]/', '_', $value); |
| 200 | 200 | }); |
| 201 | 201 | |
| 202 | - return array_filter($segments, function ($value) { |
|
| 202 | + return array_filter($segments, function($value) { |
|
| 203 | 203 | return $value !== ''; |
| 204 | 204 | }); |
| 205 | 205 | } |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | */ |
| 270 | 270 | private function createKeyFromSegments(array $segments) |
| 271 | 271 | { |
| 272 | - return '#' . implode('#', $segments); |
|
| 272 | + return '#'.implode('#', $segments); |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | /** |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function registerContainerConfiguration(LoaderInterface $loader) |
| 27 | 27 | { |
| 28 | - $loader->load(__DIR__ . '/config.yml'); |
|
| 28 | + $loader->load(__DIR__.'/config.yml'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function load(array $configs, ContainerBuilder $container) |
| 25 | 25 | { |
| 26 | 26 | $config = $this->processConfiguration(new Configuration(), $configs); |
| 27 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 27 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 28 | 28 | $loader->load('services.yml'); |
| 29 | 29 | $container->setParameter('rest_e_tags.concurrency_control', $config['concurrency_control']); |
| 30 | 30 | $container->setParameter('rest_e_tags.child_invalidation_constraint', $config['child_invalidation_constraint']); |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | */ |
| 93 | 93 | public function willFilterNonPrintable() |
| 94 | 94 | { |
| 95 | - $uri = "/a/b/" . chr(6) . "cee/?" . chr(6) . "dee=eff"; |
|
| 95 | + $uri = "/a/b/".chr(6)."cee/?".chr(6)."dee=eff"; |
|
| 96 | 96 | $version = 'version'; |
| 97 | 97 | $this->store->update(Request::create($uri), $version); |
| 98 | 98 | // The underscores are introduced by parse_url() |