@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | protected function createRedirectController($path, $name, $redirectPath, $status = 302) |
| 133 | 133 | { |
| 134 | 134 | $controller = $this->controllerCollection |
| 135 | - ->match($path, function () use ($redirectPath, $status) { |
|
| 135 | + ->match($path, function() use ($redirectPath, $status) { |
|
| 136 | 136 | return new RedirectResponse($redirectPath, $status); |
| 137 | 137 | }) |
| 138 | 138 | ->bind($name); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | private function addJsonParsing(Controller $controller) |
| 187 | 187 | { |
| 188 | - $controller->before(function (Request $request) { |
|
| 188 | + $controller->before(function(Request $request) { |
|
| 189 | 189 | $isJson = (strpos($request->headers->get('Content-Type'), 'application/json') === 0); |
| 190 | 190 | if ($isJson) { |
| 191 | 191 | $data = json_decode($request->getContent(), true); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | $app->before( |
| 71 | - function (Request $request) { |
|
| 71 | + function(Request $request) { |
|
| 72 | 72 | if ($this->shouldBeSsl($request)) { |
| 73 | 73 | $fakeRequest = clone $request; |
| 74 | 74 | $fakeRequest->server->set('HTTPS', true); |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | $url = $wantedScheme . '://' . $this->context->getHost() . $pathInfo; |
| 91 | 91 | |
| 92 | 92 | return [ |
| 93 | - '_controller' => function ($url) { |
|
| 93 | + '_controller' => function($url) { |
|
| 94 | 94 | return new RedirectResponse($url, 301); |
| 95 | 95 | }, |
| 96 | 96 | '_route' => null, |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function register(Application $app) |
| 25 | 25 | { |
| 26 | - $app['url_matcher'] = $app->share(function () use ($app) { |
|
| 26 | + $app['url_matcher'] = $app->share(function() use ($app) { |
|
| 27 | 27 | /** @var \Symfony\Cmf\Component\Routing\ChainRouter $chainRouter */ |
| 28 | 28 | $chainRouter = $app['routers']; |
| 29 | 29 | $chainRouter->setContext($app['request_context']); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | return $chainRouter; |
| 32 | 32 | }); |
| 33 | 33 | |
| 34 | - $app['routers'] = $app->share(function () { |
|
| 34 | + $app['routers'] = $app->share(function() { |
|
| 35 | 35 | return new ChainRouter(); |
| 36 | 36 | }); |
| 37 | 37 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function register(Application $app) |
| 27 | 27 | { |
| 28 | - $app['url_generator'] = $app->share(function ($app) { |
|
| 28 | + $app['url_generator'] = $app->share(function($app) { |
|
| 29 | 29 | $app->flush(); |
| 30 | 30 | |
| 31 | 31 | return $app['routers']; |
@@ -24,12 +24,12 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register(Application $app) |
| 26 | 26 | { |
| 27 | - $app['form.extension.double_submit_protection'] = $app->share(function ($app) { |
|
| 27 | + $app['form.extension.double_submit_protection'] = $app->share(function($app) { |
|
| 28 | 28 | $translator = isset($app['translator']) ? $app['translator'] : null; |
| 29 | 29 | return $this->createDoubleSubmitProtectionExtension($app, $translator); |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - $app->extend('form.extensions', function ($extensions) use ($app) { |
|
| 32 | + $app->extend('form.extensions', function($extensions) use ($app) { |
|
| 33 | 33 | $extensions[] = $app['form.extension.double_submit_protection']; |
| 34 | 34 | return $extensions; |
| 35 | 35 | }); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | public function register(Application $app) |
| 24 | 24 | { |
| 25 | 25 | $containerGlobals = new ContainerGlobals(); |
| 26 | - $containerGlobals[ApplicationConstants::FORM_FACTORY] = $containerGlobals->share(function () use ($app) { |
|
| 26 | + $containerGlobals[ApplicationConstants::FORM_FACTORY] = $containerGlobals->share(function() use ($app) { |
|
| 27 | 27 | return $app['form.factory']; |
| 28 | 28 | }); |
| 29 | 29 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | RouteNameResolverInterface $routeNameResolver |
| 31 | 31 | ) { |
| 32 | 32 | $serviceName = 'controller.service.' . str_replace('/', '.', $routeNameResolver->resolve()); |
| 33 | - $service = function () use ($application, $controllerResolver, $bundleControllerAction) { |
|
| 33 | + $service = function() use ($application, $controllerResolver, $bundleControllerAction) { |
|
| 34 | 34 | $controller = $controllerResolver->resolve($bundleControllerAction); |
| 35 | 35 | $controller->setApplication($application); |
| 36 | 36 | $controller->initialize(); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | protected function getFunction() |
| 29 | 29 | { |
| 30 | - return function ($currentController) { |
|
| 30 | + return function($currentController) { |
|
| 31 | 31 | $utilNetworkHost = new Host(); |
| 32 | 32 | $html = '<div class="zed:header__environment"><i class="icon-cogs"></i>' |
| 33 | 33 | . '<span>' . APPLICATION_ENV . '</span>' |