diff --git a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php index ebe4ccc920..1423e2e250 100644 --- a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php +++ b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php @@ -153,8 +153,6 @@ class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface { $ret = $this->getMetadata($class); if ($ret && $ret[0]->hasField($property) && !$ret[0]->hasAssociation($property)) { - $mapping = $ret[0]->getFieldMapping($property); - if (in_array($ret[0]->getTypeOfField($property), array('decimal', 'float'))) { return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); } diff --git a/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php b/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php index aac05d26ef..d5ac5a5dc5 100644 --- a/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php +++ b/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php @@ -12,7 +12,6 @@ namespace Symfony\Bridge\Monolog\Processor; use Monolog\Processor\WebProcessor as BaseWebProcessor; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php index 7c8a4b48ad..e03f70f25e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php @@ -11,7 +11,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\DependencyInjection\ContainerAware; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index 238c74cf5a..97b9dbe59e 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -240,7 +240,6 @@ class SecurityExtension extends Extension private function createFirewall(ContainerBuilder $container, $id, $firewall, &$authenticationProviders, $providerIds) { // Matcher - $i = 0; $matcher = null; if (isset($firewall['request_matcher'])) { $matcher = new Reference($firewall['request_matcher']); diff --git a/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php b/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php index 65ec8abdcc..884c5d0f4b 100644 --- a/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php +++ b/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php @@ -35,9 +35,7 @@ class RenderTokenParser extends \Twig_TokenParser // @deprecated in 2.2 and will be removed in 2.3 if ($this->parser->getStream()->test(\Twig_Token::NAME_TYPE, 'with')) { $this->parser->getStream()->next(); - $attributes = $this->parser->getExpressionParser()->parseExpression(); - } else { - $attributes = new \Twig_Node_Expression_Array(array(), $token->getLine()); + $this->parser->getExpressionParser()->parseExpression(); } // options diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index 5d1f3a2331..380266e7be 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Form; use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\Exception; use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\PropertyAccess\PropertyPath; use Symfony\Component\PropertyAccess\PropertyPathInterface; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php index 280630914a..f1a699b697 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php @@ -29,11 +29,6 @@ class MockFileSessionStorage extends MockArraySessionStorage */ private $savePath; - /** - * @var array - */ - private $sessionData; - /** * Constructor. * diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php index 20b4a5e75e..ead92bddd5 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php @@ -12,7 +12,6 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; diff --git a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php index 1176a73b4d..b90562b5d3 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\EventListener; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php index b4f3f9c1ee..3d071c4c9d 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\Fragment; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpKernel\Controller\ControllerReference; diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php index 89bf12eb35..f1b99e966e 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php @@ -77,4 +77,4 @@ class HIncludeFragmentRendererTest extends \PHPUnit_Framework_TestCase $strategy = new HIncludeFragmentRenderer($engine); $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); } -} \ No newline at end of file +} diff --git a/src/Symfony/Component/PropertyAccess/StringUtil.php b/src/Symfony/Component/PropertyAccess/StringUtil.php index 7c0eadcacd..354d164a05 100644 --- a/src/Symfony/Component/PropertyAccess/StringUtil.php +++ b/src/Symfony/Component/PropertyAccess/StringUtil.php @@ -77,7 +77,7 @@ class StringUtil // moves (move) array('sevom', 5, true, true, 'move'), - + // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf) array('sev', 3, true, true, 'f'), diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index 804da19d54..895987c702 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -151,7 +151,7 @@ class ApacheMatcherDumper extends MatcherDumper $allow[] = 'E=_ROUTING_allow_'.$method.':1'; } - if ($hostRegex = $compiledRoute->getHostRegex()) { + if ($compiledRoute->getHostRegex()) { $rule[] = sprintf("RewriteCond %%{ENV:__ROUTING_host_%s} =1", $hostRegexUnique); } @@ -162,8 +162,7 @@ class ApacheMatcherDumper extends MatcherDumper // redirect with trailing slash appended if ($hasTrailingSlash) { - - if ($hostRegex = $compiledRoute->getHostRegex()) { + if ($compiledRoute->getHostRegex()) { $rule[] = sprintf("RewriteCond %%{ENV:__ROUTING_host_%s} =1", $hostRegexUnique); } @@ -173,7 +172,7 @@ class ApacheMatcherDumper extends MatcherDumper // the main rule - if ($hostRegex = $compiledRoute->getHostRegex()) { + if ($compiledRoute->getHostRegex()) { $rule[] = sprintf("RewriteCond %%{ENV:__ROUTING_host_%s} =1", $hostRegexUnique); } diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php index 28f6411f92..e248c6de5e 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -64,6 +64,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface list($user, $credentials) = $this->getPreAuthenticatedData($request); } catch (BadCredentialsException $exception) { $this->clearToken(); + return; } diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php index 9d1cacb36e..88c397cf2f 100644 --- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -100,12 +100,15 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface throw new InvalidResourceException("MO stream content has an invalid format."); } - $formatRevision = $this->readLong($stream, $isBigEndian); + // formatRevision + $this->readLong($stream, $isBigEndian); $count = $this->readLong($stream, $isBigEndian); $offsetId = $this->readLong($stream, $isBigEndian); $offsetTranslated = $this->readLong($stream, $isBigEndian); - $sizeHashes = $this->readLong($stream, $isBigEndian); - $offsetHashes = $this->readLong($stream, $isBigEndian); + // sizeHashes + $this->readLong($stream, $isBigEndian); + // offsetHashes + $this->readLong($stream, $isBigEndian); $messages = array(); diff --git a/src/Symfony/Component/Validator/Tests/ExecutionContextTest.php b/src/Symfony/Component/Validator/Tests/ExecutionContextTest.php index abdf6de985..dd0fa846a5 100644 --- a/src/Symfony/Component/Validator/Tests/ExecutionContextTest.php +++ b/src/Symfony/Component/Validator/Tests/ExecutionContextTest.php @@ -414,7 +414,7 @@ class ExecutionContextTest extends \PHPUnit_Framework_TestCase $this->assertEquals('bam.baz', $this->context->getPropertyPath('bam.baz')); } - + public function testGetPropertyPathWithNestedCollectionsMixed() { $constraints = new Collection(array( @@ -424,13 +424,13 @@ class ExecutionContextTest extends \PHPUnit_Framework_TestCase )), 'name' => new ConstraintA() )); - + $visitor = new ValidationVisitor('Root', $this->metadataFactory, new ConstraintValidatorFactory(), $this->translator); $context = new ExecutionContext($visitor, $this->translator, self::TRANS_DOMAIN); $context->validateValue(array('foo' => array('foo' => 'VALID')), $constraints); $violations = $context->getViolations(); - - $this->assertEquals('[name]', $violations[1]->getPropertyPath()); + + $this->assertEquals('[name]', $violations[1]->getPropertyPath()); } } diff --git a/src/Symfony/Component/Validator/Tests/GraphWalkerTest.php b/src/Symfony/Component/Validator/Tests/GraphWalkerTest.php index d9419f1967..b151bd162a 100644 --- a/src/Symfony/Component/Validator/Tests/GraphWalkerTest.php +++ b/src/Symfony/Component/Validator/Tests/GraphWalkerTest.php @@ -581,7 +581,7 @@ class GraphWalkerTest extends \PHPUnit_Framework_TestCase $violations = $this->walker->getViolations(); $this->assertEquals('collection[foo][bar]', $violations[0]->getPropertyPath()); } - + public function testWalkObjectUsesCorrectPropertyPathInViolationsWhenUsingNestedMixedCollections() { $constraint = new Collection(array(