From 464b67ed09668168cabfd77b6b3cfa26ceb1b0b0 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Sun, 5 Jul 2015 16:01:47 +0200 Subject: [PATCH] fix CS --- .../Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php | 4 ++-- src/Symfony/Component/BrowserKit/Cookie.php | 1 - .../Component/DependencyInjection/Dumper/PhpDumper.php | 8 ++++---- src/Symfony/Component/DomCrawler/Tests/FormTest.php | 1 - src/Symfony/Component/Form/PreloadedExtension.php | 6 +++--- .../Component/HttpFoundation/Tests/RequestTest.php | 1 - .../Tests/EventListener/FragmentListenerTest.php | 1 - .../Component/Routing/Matcher/Dumper/PhpMatcherDumper.php | 6 +++--- 8 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php index eacbd4f3c9..482b4d7ed7 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php @@ -91,7 +91,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase 'utf8' => 'foo', array( 'nonutf8' => DbalLogger::BINARY_DATA_VALUE, - ) + ), ) ) ; @@ -100,7 +100,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase 'utf8' => 'foo', array( 'nonutf8' => "\x7F\xFF", - ) + ), )); } diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index 18b9324403..e690cdacd5 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -82,7 +82,6 @@ class Cookie $this->expires = $timestampAsDateTime->getTimestamp(); } - } /** diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 64d5fb9bb6..db0a9f97d2 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -797,8 +797,8 @@ EOF; if (count($scopes = $this->container->getScopes()) > 0) { $code .= "\n"; - $code .= " \$this->scopes = ".$this->dumpValue($scopes).";\n"; - $code .= " \$this->scopeChildren = ".$this->dumpValue($this->container->getScopeChildren()).";\n"; + $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n"; + $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren()).";\n"; } $code .= $this->addMethodMap(); @@ -843,8 +843,8 @@ EOF; $code .= "\n"; if (count($scopes = $this->container->getScopes()) > 0) { - $code .= " \$this->scopes = ".$this->dumpValue($scopes).";\n"; - $code .= " \$this->scopeChildren = ".$this->dumpValue($this->container->getScopeChildren()).";\n"; + $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n"; + $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren()).";\n"; } else { $code .= " \$this->scopes = array();\n"; $code .= " \$this->scopeChildren = array();\n"; diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index c657e3639e..79b1a3b118 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -805,7 +805,6 @@ class FormTest extends \PHPUnit_Framework_TestCase */ public function testFormRegistrySetArrayOnNotCompoundField() { - $registry = new FormFieldRegistry(); $registry->add($this->getFormFieldMock('bar')); diff --git a/src/Symfony/Component/Form/PreloadedExtension.php b/src/Symfony/Component/Form/PreloadedExtension.php index f70ca8d455..6b4f9ef6a1 100644 --- a/src/Symfony/Component/Form/PreloadedExtension.php +++ b/src/Symfony/Component/Form/PreloadedExtension.php @@ -38,9 +38,9 @@ class PreloadedExtension implements FormExtensionInterface /** * Creates a new preloaded extension. * - * @param FormTypeInterface[] $types The types that the extension should support. - * @param array[FormTypeExtensionInterface[]] typeExtensions The type extensions that the extension should support. - * @param FormTypeGuesserInterface|null $typeGuesser The guesser that the extension should support. + * @param FormTypeInterface[] $types The types that the extension should support. + * @param array[FormTypeExtensionInterface[]] $typeExtensions The type extensions that the extension should support. + * @param FormTypeGuesserInterface|null $typeGuesser The guesser that the extension should support. */ public function __construct(array $types, array $typeExtensions, FormTypeGuesserInterface $typeGuesser = null) { diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 990d3a842d..366b555f92 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -939,7 +939,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase } /** - * * @dataProvider getContentCantBeCalledTwiceWithResourcesProvider */ public function testGetContentCanBeCalledTwiceWithResources($first, $second) diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php index 18edee6123..fd5d63b167 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php @@ -34,7 +34,6 @@ class FragmentListenerTest extends \PHPUnit_Framework_TestCase $this->assertTrue($request->query->has('_path')); } - public function testOnlyTriggeredIfControllerWasNotDefinedYet() { $request = Request::create('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo'); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index 49d137f4ab..605ee560eb 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -216,11 +216,11 @@ EOF; $conditions[] = sprintf("rtrim(\$pathinfo, '/') === %s", var_export(rtrim(str_replace('\\', '', $m['url']), '/'), true)); $hasTrailingSlash = true; } else { - $conditions[] = sprintf("\$pathinfo === %s", var_export(str_replace('\\', '', $m['url']), true)); + $conditions[] = sprintf('$pathinfo === %s', var_export(str_replace('\\', '', $m['url']), true)); } } else { if ($compiledRoute->getStaticPrefix() && $compiledRoute->getStaticPrefix() !== $parentPrefix) { - $conditions[] = sprintf("0 === strpos(\$pathinfo, %s)", var_export($compiledRoute->getStaticPrefix(), true)); + $conditions[] = sprintf('0 === strpos($pathinfo, %s)', var_export($compiledRoute->getStaticPrefix(), true)); } $regex = $compiledRoute->getRegex(); @@ -228,7 +228,7 @@ EOF; $regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2); $hasTrailingSlash = true; } - $conditions[] = sprintf("preg_match(%s, \$pathinfo, \$matches)", var_export($regex, true)); + $conditions[] = sprintf('preg_match(%s, $pathinfo, $matches)', var_export($regex, true)); $matches = true; }