diff --git a/src/Symfony/Components/Routing/Loader/FileLoader.php b/src/Symfony/Components/Routing/Loader/FileLoader.php index d52e30fef6..dcd9ce5c94 100644 --- a/src/Symfony/Components/Routing/Loader/FileLoader.php +++ b/src/Symfony/Components/Routing/Loader/FileLoader.php @@ -68,13 +68,12 @@ abstract class FileLoader implements LoaderInterface static protected function isAbsolutePath($file) { - if ($file[0] == '/' || $file[0] == '\\' || - (strlen($file) > 3 && ctype_alpha($file[0]) && - $file[1] == ':' && - ($file[2] == '\\' || $file[2] == '/') - ) - ) - { + if ($file[0] == '/' || $file[0] == '\\' + || (strlen($file) > 3 && ctype_alpha($file[0]) + && $file[1] == ':' + && ($file[2] == '\\' || $file[2] == '/') + ) + ) { return true; } diff --git a/src/Symfony/Components/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Components/Routing/Matcher/Dumper/PhpMatcherDumper.php index eef2d87bbb..ad4ba7a5a2 100644 --- a/src/Symfony/Components/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Components/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -73,8 +73,9 @@ class PhpMatcherDumper extends MatcherDumper $conditions = implode(' && ', $conditions); $code[] = sprintf(<<mergeDefaults(\$matches, %s), array('_route' => '%s')); + } EOF , str_replace("\n", '', var_export($compiledRoute->getDefaults(), true)), $name); diff --git a/src/Symfony/Components/Templating/Loader/FilesystemLoader.php b/src/Symfony/Components/Templating/Loader/FilesystemLoader.php index 68674d28c9..45b021e2eb 100644 --- a/src/Symfony/Components/Templating/Loader/FilesystemLoader.php +++ b/src/Symfony/Components/Templating/Loader/FilesystemLoader.php @@ -96,13 +96,12 @@ class FilesystemLoader extends Loader */ static protected function isAbsolutePath($file) { - if ($file[0] == '/' || $file[0] == '\\' || - (strlen($file) > 3 && ctype_alpha($file[0]) && - $file[1] == ':' && - ($file[2] == '\\' || $file[2] == '/') - ) - ) - { + if ($file[0] == '/' || $file[0] == '\\' + || (strlen($file) > 3 && ctype_alpha($file[0]) + && $file[1] == ':' + && ($file[2] == '\\' || $file[2] == '/') + ) + ) { return true; } diff --git a/src/Symfony/Components/Yaml/Inline.php b/src/Symfony/Components/Yaml/Inline.php index 79c2283db3..978af3783c 100644 --- a/src/Symfony/Components/Yaml/Inline.php +++ b/src/Symfony/Components/Yaml/Inline.php @@ -120,11 +120,9 @@ class Inline { // array $keys = array_keys($value); - if ( - (1 == count($keys) && '0' == $keys[0]) - || - (count($keys) > 1 && array_reduce($keys, function ($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2)) - { + if ((1 == count($keys) && '0' == $keys[0]) + || (count($keys) > 1 && array_reduce($keys, function ($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2) + ) { $output = array(); foreach ($value as $val) { $output[] = self::dump($val); diff --git a/src/Symfony/Components/Yaml/Parser.php b/src/Symfony/Components/Yaml/Parser.php index f7cf8e80b1..ef495d6c22 100644 --- a/src/Symfony/Components/Yaml/Parser.php +++ b/src/Symfony/Components/Yaml/Parser.php @@ -82,8 +82,8 @@ class Parser } else { if (isset($values['leadspaces']) && ' ' == $values['leadspaces'] - && preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{].*?) *\:(\s+(?P.+?))?\s*$#', $values['value'], $matches)) - { + && preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{].*?) *\:(\s+(?P.+?))?\s*$#', $values['value'], $matches) + ) { // this is a compact notation element, add to next block and parse $c = $this->getRealCurrentLineNb(); $parser = new Parser($c); diff --git a/src/Symfony/Framework/ProfilerBundle/Listener/WebDebugToolbar.php b/src/Symfony/Framework/ProfilerBundle/Listener/WebDebugToolbar.php index e81ff07378..276e7ed3d6 100644 --- a/src/Symfony/Framework/ProfilerBundle/Listener/WebDebugToolbar.php +++ b/src/Symfony/Framework/ProfilerBundle/Listener/WebDebugToolbar.php @@ -47,16 +47,11 @@ class WebDebugToolbar $request = $this->container->getRequestService(); - if ( - '3' === substr($response->getStatusCode(), 0, 1) - || - ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html')) - || - 'html' !== $request->getRequestFormat() - || - $request->isXmlHttpRequest() - ) - { + if ('3' === substr($response->getStatusCode(), 0, 1) + || ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html')) + || 'html' !== $request->getRequestFormat() + || $request->isXmlHttpRequest() + ) { return $response; } diff --git a/src/Symfony/Framework/WebBundle/Controller/ExceptionController.php b/src/Symfony/Framework/WebBundle/Controller/ExceptionController.php index 13f3d6d746..aef05d5129 100644 --- a/src/Symfony/Framework/WebBundle/Controller/ExceptionController.php +++ b/src/Symfony/Framework/WebBundle/Controller/ExceptionController.php @@ -67,7 +67,9 @@ class ExceptionController extends Controller } $currentContent = ''; - while (false !== $content = ob_get_clean()) { $currentContent .= $content; } + while (false !== $content = ob_get_clean()) { + $currentContent .= $content; + } ob_start(); require $template; diff --git a/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php b/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php index 3a6fb7f76b..1d0b38c4fc 100644 --- a/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php +++ b/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php @@ -91,8 +91,7 @@ class ControllerLoader $logs[] = sprintf('Failed finding controller "%s:%s" from namespace "%s" (%s)', $bundle, $controller, $namespace, $try); } } else { - if (!in_array($namespace.'\\'.$bundle.'\\Bundle', array_map(function ($bundle) { return get_class($bundle); }, $this->container->getKernelService()->getBundles()))) - { + if (!in_array($namespace.'\\'.$bundle.'\\Bundle', array_map(function ($bundle) { return get_class($bundle); }, $this->container->getKernelService()->getBundles()))) { throw new \LogicException(sprintf('To use the "%s" controller, you first need to enable the Bundle "%s" in your Kernel class.', $try, $namespace.'\\'.$bundle)); }