This commit is contained in:
Dariusz Ruminski 2015-07-05 16:01:47 +02:00
parent 8a8a929d5c
commit 464b67ed09
8 changed files with 12 additions and 16 deletions

View File

@ -91,7 +91,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase
'utf8' => 'foo', 'utf8' => 'foo',
array( array(
'nonutf8' => DbalLogger::BINARY_DATA_VALUE, 'nonutf8' => DbalLogger::BINARY_DATA_VALUE,
) ),
) )
) )
; ;
@ -100,7 +100,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase
'utf8' => 'foo', 'utf8' => 'foo',
array( array(
'nonutf8' => "\x7F\xFF", 'nonutf8' => "\x7F\xFF",
) ),
)); ));
} }

View File

@ -82,7 +82,6 @@ class Cookie
$this->expires = $timestampAsDateTime->getTimestamp(); $this->expires = $timestampAsDateTime->getTimestamp();
} }
} }
/** /**

View File

@ -797,8 +797,8 @@ EOF;
if (count($scopes = $this->container->getScopes()) > 0) { if (count($scopes = $this->container->getScopes()) > 0) {
$code .= "\n"; $code .= "\n";
$code .= " \$this->scopes = ".$this->dumpValue($scopes).";\n"; $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n";
$code .= " \$this->scopeChildren = ".$this->dumpValue($this->container->getScopeChildren()).";\n"; $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren()).";\n";
} }
$code .= $this->addMethodMap(); $code .= $this->addMethodMap();
@ -843,8 +843,8 @@ EOF;
$code .= "\n"; $code .= "\n";
if (count($scopes = $this->container->getScopes()) > 0) { if (count($scopes = $this->container->getScopes()) > 0) {
$code .= " \$this->scopes = ".$this->dumpValue($scopes).";\n"; $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n";
$code .= " \$this->scopeChildren = ".$this->dumpValue($this->container->getScopeChildren()).";\n"; $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren()).";\n";
} else { } else {
$code .= " \$this->scopes = array();\n"; $code .= " \$this->scopes = array();\n";
$code .= " \$this->scopeChildren = array();\n"; $code .= " \$this->scopeChildren = array();\n";

View File

@ -805,7 +805,6 @@ class FormTest extends \PHPUnit_Framework_TestCase
*/ */
public function testFormRegistrySetArrayOnNotCompoundField() public function testFormRegistrySetArrayOnNotCompoundField()
{ {
$registry = new FormFieldRegistry(); $registry = new FormFieldRegistry();
$registry->add($this->getFormFieldMock('bar')); $registry->add($this->getFormFieldMock('bar'));

View File

@ -38,9 +38,9 @@ class PreloadedExtension implements FormExtensionInterface
/** /**
* Creates a new preloaded extension. * Creates a new preloaded extension.
* *
* @param FormTypeInterface[] $types The types 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 array[FormTypeExtensionInterface[]] $typeExtensions The type extensions that the extension should support.
* @param FormTypeGuesserInterface|null $typeGuesser The guesser 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) public function __construct(array $types, array $typeExtensions, FormTypeGuesserInterface $typeGuesser = null)
{ {

View File

@ -939,7 +939,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase
} }
/** /**
*
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider * @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
*/ */
public function testGetContentCanBeCalledTwiceWithResources($first, $second) public function testGetContentCanBeCalledTwiceWithResources($first, $second)

View File

@ -34,7 +34,6 @@ class FragmentListenerTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($request->query->has('_path')); $this->assertTrue($request->query->has('_path'));
} }
public function testOnlyTriggeredIfControllerWasNotDefinedYet() public function testOnlyTriggeredIfControllerWasNotDefinedYet()
{ {
$request = Request::create('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo'); $request = Request::create('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo');

View File

@ -216,11 +216,11 @@ EOF;
$conditions[] = sprintf("rtrim(\$pathinfo, '/') === %s", var_export(rtrim(str_replace('\\', '', $m['url']), '/'), true)); $conditions[] = sprintf("rtrim(\$pathinfo, '/') === %s", var_export(rtrim(str_replace('\\', '', $m['url']), '/'), true));
$hasTrailingSlash = true; $hasTrailingSlash = true;
} else { } else {
$conditions[] = sprintf("\$pathinfo === %s", var_export(str_replace('\\', '', $m['url']), true)); $conditions[] = sprintf('$pathinfo === %s', var_export(str_replace('\\', '', $m['url']), true));
} }
} else { } else {
if ($compiledRoute->getStaticPrefix() && $compiledRoute->getStaticPrefix() !== $parentPrefix) { 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(); $regex = $compiledRoute->getRegex();
@ -228,7 +228,7 @@ EOF;
$regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2); $regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2);
$hasTrailingSlash = true; $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; $matches = true;
} }