minor #12872 [2.6] CS Fixes And Removed An Unused Import (GrahamCampbell)
This PR was squashed before being merged into the 2.6 branch (closes #12872).
Discussion
----------
[2.6] CS Fixes And Removed An Unused Import
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
##### This pull request fixes some cs issues in symfony 2.6.
This is the sequel to #12856.
Commits
-------
2f10a0a
[2.6] CS Fixes And Removed An Unused Import
This commit is contained in:
commit
b0ba74d49f
@ -55,10 +55,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$emConfigs = array(
|
||||
'em1' => array(
|
||||
'auto_mapping' => true
|
||||
'auto_mapping' => true,
|
||||
),
|
||||
'em2' => array(
|
||||
'auto_mapping' => true
|
||||
'auto_mapping' => true,
|
||||
),
|
||||
);
|
||||
|
||||
@ -79,34 +79,34 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
|
||||
return array(
|
||||
array(
|
||||
array( // no auto mapping on em1
|
||||
'auto_mapping' => false
|
||||
'auto_mapping' => false,
|
||||
),
|
||||
array( // no auto mapping on em2
|
||||
'auto_mapping' => false
|
||||
'auto_mapping' => false,
|
||||
),
|
||||
array(),
|
||||
array()
|
||||
array(),
|
||||
),
|
||||
array(
|
||||
array( // no auto mapping on em1
|
||||
'auto_mapping' => false
|
||||
'auto_mapping' => false,
|
||||
),
|
||||
array( // auto mapping enabled on em2
|
||||
'auto_mapping' => true
|
||||
'auto_mapping' => true,
|
||||
),
|
||||
array(),
|
||||
array(
|
||||
'mappings' => array(
|
||||
'FristBundle' => array(
|
||||
'mapping' => true,
|
||||
'is_bundle' => true
|
||||
'is_bundle' => true,
|
||||
),
|
||||
'SecondBundle' => array(
|
||||
'mapping' => true,
|
||||
'is_bundle' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
'is_bundle' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
array( // no auto mapping on em1, but it defines SecondBundle as own
|
||||
@ -114,30 +114,30 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
|
||||
'mappings' => array(
|
||||
'SecondBundle' => array(
|
||||
'mapping' => true,
|
||||
'is_bundle' => true
|
||||
)
|
||||
)
|
||||
'is_bundle' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
array( // auto mapping enabled on em2
|
||||
'auto_mapping' => true
|
||||
'auto_mapping' => true,
|
||||
),
|
||||
array(
|
||||
'mappings' => array(
|
||||
'SecondBundle' => array(
|
||||
'mapping' => true,
|
||||
'is_bundle' => true
|
||||
)
|
||||
)
|
||||
'is_bundle' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'mappings' => array(
|
||||
'FristBundle' => array(
|
||||
'mapping' => true,
|
||||
'is_bundle' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
'is_bundle' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -163,10 +163,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
|
||||
$newEmConfigs = $method->invoke($this->extension, $emConfigs, $bundles);
|
||||
|
||||
$this->assertEquals($newEmConfigs["em1"], array_merge(array(
|
||||
'auto_mapping' => false
|
||||
'auto_mapping' => false,
|
||||
), $expectedEm1));
|
||||
$this->assertEquals($newEmConfigs["em2"], array_merge(array(
|
||||
'auto_mapping' => false
|
||||
'auto_mapping' => false,
|
||||
), $expectedEm2));
|
||||
}
|
||||
|
||||
|
@ -141,5 +141,4 @@ EOT
|
||||
// We use a custom iterator to ignore VCS files
|
||||
$filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -122,6 +122,7 @@ class ControllerNameParser
|
||||
* Attempts to find a bundle that is *similar* to the given bundle name
|
||||
*
|
||||
* @param string $nonExistentBundleName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function findAlternative($nonExistentBundleName)
|
||||
|
@ -12,9 +12,7 @@
|
||||
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
|
||||
|
||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
|
@ -81,6 +81,7 @@ class Specificity
|
||||
* 0 if they are equal, and 1 if the argument is lower
|
||||
*
|
||||
* @param Specificity $specificity
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function compareTo(Specificity $specificity)
|
||||
|
@ -22,6 +22,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
|
||||
protected function createEventDispatcher()
|
||||
{
|
||||
$container = new Container();
|
||||
|
||||
return new ContainerAwareEventDispatcher($container);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class ExpressionLanguageTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testProviders()
|
||||
{
|
||||
$expressionLanguage = new ExpressionLanguage(null, array(new TestProvider));
|
||||
$expressionLanguage = new ExpressionLanguage(null, array(new TestProvider()));
|
||||
$this->assertEquals('foo', $expressionLanguage->evaluate('identity("foo")'));
|
||||
$this->assertEquals('"foo"', $expressionLanguage->compile('identity("foo")'));
|
||||
}
|
||||
|
@ -290,6 +290,7 @@ class Filesystem
|
||||
|
||||
if ($onWindows && $copyOnWindows) {
|
||||
$this->mirror($originDir, $targetDir);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -167,6 +167,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
||||
* Gets the Esi instance
|
||||
*
|
||||
* @throws \LogicException
|
||||
*
|
||||
* @return Esi An Esi instance
|
||||
*
|
||||
* @deprecated Deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead
|
||||
|
@ -29,7 +29,8 @@ class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertSame('dump', $collector->getName());
|
||||
|
||||
$collector->dump($data); $line = __LINE__;
|
||||
$collector->dump($data);
|
||||
$line = __LINE__;
|
||||
$this->assertSame(1, $collector->getDumpsCount());
|
||||
|
||||
$dump = $collector->getDumps('html');
|
||||
@ -61,7 +62,8 @@ class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$data = new Data(array(array(456)));
|
||||
$collector = new DumpDataCollector();
|
||||
$collector->dump($data); $line = __LINE__;
|
||||
$collector->dump($data);
|
||||
$line = __LINE__;
|
||||
|
||||
ob_start();
|
||||
$collector = null;
|
||||
|
@ -21,7 +21,6 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
|
||||
use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
|
||||
use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
|
||||
use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,8 @@ class AuthenticationUtils
|
||||
|
||||
/**
|
||||
* @param bool $clearSession
|
||||
* @return null|AuthenticationException
|
||||
*
|
||||
* @return AuthenticationException|null
|
||||
*/
|
||||
public function getLastAuthenticationError($clearSession = true)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ class RemoteUserAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
|
||||
public function testGetPreAuthenticatedData()
|
||||
{
|
||||
$serverVars = array(
|
||||
'REMOTE_USER' => 'TheUser'
|
||||
'REMOTE_USER' => 'TheUser',
|
||||
);
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), $serverVars);
|
||||
@ -69,7 +69,7 @@ class RemoteUserAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
|
||||
$userCredentials = array('TheUser', null);
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array(
|
||||
'TheUserKey' => 'TheUser'
|
||||
'TheUserKey' => 'TheUser',
|
||||
));
|
||||
$context = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface');
|
||||
|
||||
|
@ -151,12 +151,12 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||
array(
|
||||
array(
|
||||
'bar' => function ($bar) {
|
||||
return null;
|
||||
return;
|
||||
},
|
||||
),
|
||||
'baz',
|
||||
array('foo' => '', 'bar' => null),
|
||||
'Null an item'
|
||||
'Null an item',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
|
Reference in New Issue
Block a user