minor #15204 CS fixes for 2.3 (keradus)
This PR was merged into the 2.3 branch.
Discussion
----------
CS fixes for 2.3
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
To keep fabbot.io happy ;)
Commits
-------
464b67e
fix CS
This commit is contained in:
commit
4706a90e9d
@ -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",
|
||||||
)
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,6 @@ class Cookie
|
|||||||
|
|
||||||
$this->expires = $timestampAsDateTime->getTimestamp();
|
$this->expires = $timestampAsDateTime->getTimestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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";
|
||||||
|
@ -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'));
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ 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)
|
||||||
|
@ -939,7 +939,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
|
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
|
||||||
*/
|
*/
|
||||||
public function testGetContentCanBeCalledTwiceWithResources($first, $second)
|
public function testGetContentCanBeCalledTwiceWithResources($first, $second)
|
||||||
|
@ -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');
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user