Ver Fonte

some fixes by just "blindly" trying to make phpStorm code analysis happier

Lukas Kahwe Smith há 14 anos atrás
pai
commit
dd71501f54
41 ficheiros alterados com 53 adições e 61 exclusões
  1. 7 4
      src/Symfony/Component/Console/Application.php
  2. 1 1
      src/Symfony/Component/Console/Tester/ApplicationTester.php
  3. 1 1
      src/Symfony/Component/Console/Tester/CommandTester.php
  4. 2 2
      src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php
  5. 2 2
      src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
  6. 2 2
      src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
  7. 1 1
      src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php
  8. 2 2
      src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php
  9. 2 1
      src/Symfony/Component/DependencyInjection/Configuration/ArrayNode.php
  10. 1 1
      src/Symfony/Component/DependencyInjection/Container.php
  11. 1 1
      src/Symfony/Component/DependencyInjection/Definition.php
  12. 0 2
      src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
  13. 1 1
      src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
  14. 1 1
      src/Symfony/Component/DependencyInjection/InterfaceInjector.php
  15. 0 3
      src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php
  16. 1 1
      src/Symfony/Component/DomCrawler/Form.php
  17. 1 1
      src/Symfony/Component/Form/FieldInterface.php
  18. 0 1
      src/Symfony/Component/Form/Form.php
  19. 0 2
      src/Symfony/Component/Routing/Loader/PhpFileLoader.php
  20. 1 0
      src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
  21. 2 2
      src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
  22. 1 2
      src/Symfony/Component/Security/Acl/Domain/Acl.php
  23. 3 3
      src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php
  24. 1 2
      src/Symfony/Component/Security/Acl/Domain/Entry.php
  25. 1 2
      src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php
  26. 1 1
      src/Symfony/Component/Security/Acl/Voter/AclVoter.php
  27. 1 1
      src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php
  28. 1 0
      src/Symfony/Component/Security/Http/EntryPoint/FormAuthenticationEntryPoint.php
  29. 0 2
      src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php
  30. 2 1
      src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
  31. 0 1
      src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
  32. 1 1
      src/Symfony/Component/Security/Http/FirewallMap.php
  33. 1 1
      src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
  34. 0 1
      src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
  35. 1 1
      src/Symfony/Component/Templating/PhpEngine.php
  36. 1 1
      src/Symfony/Component/Translation/PluralizationRules.php
  37. 2 2
      src/Symfony/Component/Validator/Constraints/EmailValidator.php
  38. 2 1
      src/Symfony/Component/Validator/Constraints/ExecuteValidator.php
  39. 3 3
      src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php
  40. 1 2
      src/Symfony/Component/Validator/Mapping/Loader/FileLoader.php
  41. 1 1
      src/Symfony/Component/Yaml/Parser.php

+ 7 - 4
src/Symfony/Component/Console/Application.php

@@ -618,19 +618,22 @@ class Application
         if ($namespace) {
             $commandsXML->setAttribute('namespace', $namespace);
         } else {
-            $xml->appendChild($namespacesXML = $dom->createElement('namespaces'));
+            $namespacesXML = $dom->createElement('namespaces');
+            $xml->appendChild($namespacesXML);
         }
 
         // add commands by namespace
         foreach ($this->sortCommands($commands) as $space => $commands) {
             if (!$namespace) {
-                $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace'));
+                $namespaceArrayXML = $dom->createElement('namespace');
+                $namespacesXML->appendChild($namespaceArrayXML);
                 $namespaceArrayXML->setAttribute('id', $space);
             }
 
             foreach ($commands as $command) {
                 if (!$namespace) {
-                    $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command'));
+                    $commandXML = $dom->createElement('command');
+                    $namespaceArrayXML->appendChild($commandXML);
                     $commandXML->appendChild($dom->createTextNode($command->getName()));
                 }
 
@@ -731,7 +734,7 @@ class Application
         }
         ksort($namespacedCommands);
 
-        foreach ($namespacedCommands as $name => &$commands) {
+        foreach ($namespacedCommands as &$commands) {
             ksort($commands);
         }
 

+ 1 - 1
src/Symfony/Component/Console/Tester/ApplicationTester.php

@@ -62,7 +62,7 @@ class ApplicationTester
             $this->output->setVerbosity($options['verbosity']);
         }
 
-        $ret = $this->application->run($this->input, $this->output);
+        $this->application->run($this->input, $this->output);
 
         rewind($this->output->getStream());
 

+ 1 - 1
src/Symfony/Component/Console/Tester/CommandTester.php

@@ -62,7 +62,7 @@ class CommandTester
             $this->output->setVerbosity($options['verbosity']);
         }
 
-        $ret = $this->command->run($this->input, $this->output);
+        $this->command->run($this->input, $this->output);
 
         rewind($this->output->getStream());
 

+ 2 - 2
src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php

@@ -70,7 +70,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface
 
     protected function processArguments(array $arguments)
     {
-        foreach ($arguments as $k => $argument) {
+        foreach ($arguments as $argument) {
             if (is_array($argument)) {
                 $this->processArguments($argument);
             } else if ($argument instanceof Reference) {
@@ -100,4 +100,4 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface
 
         return $this->container->getDefinition($id);
     }
-}
+}

+ 2 - 2
src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php

@@ -35,7 +35,7 @@ class InlineServiceDefinitionsPass implements RepeatablePassInterface
     {
         $this->graph = $container->getCompiler()->getServiceReferenceGraph();
 
-        foreach ($container->getDefinitions() as $id => $definition) {
+        foreach ($container->getDefinitions() as $definition) {
             $definition->setArguments(
                 $this->inlineArguments($container, $definition->getArguments())
             );
@@ -93,4 +93,4 @@ class InlineServiceDefinitionsPass implements RepeatablePassInterface
 
         return count(array_unique($ids)) <= 1;
     }
-}
+}

+ 2 - 2
src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php

@@ -27,7 +27,7 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface
         foreach ($container->getAliases() as $id => $alias) {
             $aliasId = (string) $alias;
 
-            $definition = $container->getDefinition($aliasId = (string) $alias);
+            $definition = $container->getDefinition($aliasId);
 
             if ($definition->isPublic()) {
                 continue;
@@ -80,4 +80,4 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface
 
         return $arguments;
     }
-}
+}

+ 1 - 1
src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php

@@ -26,7 +26,7 @@ class ResolveParameterPlaceHoldersPass implements CompilerPassInterface
     {
         $this->parameterBag = $container->getParameterBag();
 
-        foreach ($container->getDefinitions() as $id => $definition) {
+        foreach ($container->getDefinitions() as $definition) {
             $definition->setClass($this->resolveValue($definition->getClass()));
             $definition->setFile($this->resolveValue($definition->getFile()));
             $definition->setArguments($this->resolveValue($definition->getArguments()));

+ 2 - 2
src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php

@@ -28,7 +28,7 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
     {
         $this->container = $container;
 
-        foreach ($container->getDefinitions() as $id => $definition)
+        foreach ($container->getDefinitions() as $definition)
         {
             if ($definition->isSynthetic() || $definition->isAbstract()) {
                 continue;
@@ -71,4 +71,4 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
 
         return $id;
     }
-}
+}

+ 2 - 1
src/Symfony/Component/DependencyInjection/Configuration/ArrayNode.php

@@ -3,6 +3,7 @@
 namespace Symfony\Component\DependencyInjection\Configuration;
 
 use Symfony\Component\DependencyInjection\Extension\Extension;
+use Symfony\Component\DependencyInjection\Configuration\Exception\InvalidTypeException;
 
 class ArrayNode extends BaseNode implements PrototypeNodeInterface
 {
@@ -102,4 +103,4 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
 
         return $normalized;
     }
-}
+}

+ 1 - 1
src/Symfony/Component/DependencyInjection/Container.php

@@ -245,7 +245,7 @@ class Container implements ContainerInterface
         $ids = array();
         $r = new \ReflectionClass($this);
         foreach ($r->getMethods() as $method) {
-            if (preg_match('/^get(.+)Service$/', $name = $method->getName(), $match)) {
+            if (preg_match('/^get(.+)Service$/', $method->getName(), $match)) {
                 $ids[] = self::underscore($match[1]);
             }
         }

+ 1 - 1
src/Symfony/Component/DependencyInjection/Definition.php

@@ -238,7 +238,7 @@ class Definition
      */
     public function hasMethodCall($method)
     {
-        foreach ($this->calls as $i => $call) {
+        foreach ($this->calls as $call) {
             if ($call[0] === $method) {
                 return true;
             }

+ 0 - 2
src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php

@@ -158,8 +158,6 @@ class GraphvizDumper extends Dumper
 
     protected function startDot()
     {
-        $parameters = var_export($this->container->getParameterBag()->all(), true);
-
         return sprintf("digraph sc {\n  %s\n  node [%s];\n  edge [%s];\n\n",
             $this->addOptions($this->options['graph']),
             $this->addOptions($this->options['node']),

+ 1 - 1
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

@@ -676,7 +676,7 @@ EOF;
             if (is_array($value)) {
                 $value = $this->exportParameters($value, $indent + 4);
             } elseif ($value instanceof Variable) {
-                throw new \InvalidArgumentException(sprintf('you cannot dump a container with parameters that contain variable references. Variable "%s" found.', $variable));
+                throw new \InvalidArgumentException(sprintf('you cannot dump a container with parameters that contain variable references. Variable "%s" found.', $value));
             } elseif ($value instanceof Definition) {
                 throw new \InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain service definitions. Definition for "%s" found.', $value->getClass()));
             } elseif ($value instanceof Reference) {

+ 1 - 1
src/Symfony/Component/DependencyInjection/InterfaceInjector.php

@@ -150,7 +150,7 @@ class InterfaceInjector
      */
     public function hasMethodCall($method)
     {
-        foreach ($this->calls as $i => $call) {
+        foreach ($this->calls as $call) {
             if ($call[0] === $method) {
                 return true;
             }

+ 0 - 3
src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php

@@ -30,9 +30,6 @@ class PhpFileLoader extends FileLoader
      */
     public function load($file)
     {
-        $container = $this->container;
-        $loader = $this;
-
         $path = $this->findFile($file);
         $this->currentDir = dirname($path);
         $this->container->addResource(new FileResource($path));

+ 1 - 1
src/Symfony/Component/DomCrawler/Form.php

@@ -11,7 +11,7 @@
 
 namespace Symfony\Component\DomCrawler;
 
-use Symfony\Component\DomCrawler\FormField;
+use Symfony\Component\DomCrawler\Field\FormField;
 
 /**
  * Form represents an HTML form.

+ 1 - 1
src/Symfony/Component/Form/FieldInterface.php

@@ -11,7 +11,7 @@
 
 namespace Symfony\Component\Form;
 
-use Symfony\Component\I18N\TranslatorInterface;
+use Symfony\Component\Translation\TranslatorInterface;
 
 /**
  * A form field that can be embedded in a form.

+ 0 - 1
src/Symfony/Component/Form/Form.php

@@ -737,7 +737,6 @@ class Form extends Field implements \IteratorAggregate, FormInterface
     public function validate()
     {
         $validator = $this->getOption('validator');
-        $groups = $this->getOption('validation_groups');
 
         if (null === $validator) {
             throw new MissingOptionsException('The option "validator" is required for validating', array('validator'));

+ 0 - 2
src/Symfony/Component/Routing/Loader/PhpFileLoader.php

@@ -30,8 +30,6 @@ class PhpFileLoader extends FileLoader
      */
     public function load($file, $type = null)
     {
-        $loader = $this;
-
         $path = $this->locator->locate($file);
 
         $collection = include $path;

+ 1 - 0
src/Symfony/Component/Security/Acl/Dbal/AclProvider.php

@@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Acl\Dbal;
 
 use Doctrine\DBAL\Driver\Connection;
 use Doctrine\DBAL\Driver\Statement;
+use Symfony\Component\Security\Acl\Model\AclInterface;
 use Symfony\Component\Security\Acl\Domain\Acl;
 use Symfony\Component\Security\Acl\Domain\Entry;
 use Symfony\Component\Security\Acl\Domain\FieldEntry;

+ 2 - 2
src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php

@@ -785,7 +785,7 @@ QUERY;
             }
         }
 
-        foreach ($changes[0] as $field => $old) {
+        foreach ($changes[0] as $old) {
             for ($i=0,$c=count($old); $i<$c; $i++) {
                 $ace = $old[$i];
 
@@ -884,4 +884,4 @@ QUERY;
             $this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets));
         }
     }
-}
+}

+ 1 - 2
src/Symfony/Component/Security/Acl/Domain/Acl.php

@@ -17,7 +17,6 @@ use Symfony\Component\Security\Acl\Model\EntryInterface;
 use Symfony\Component\Security\Acl\Model\MutableAclInterface;
 use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface;
 use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface;
-use Symfony\Component\Security\Acl\Model\PermissionInterface;
 use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
 
 
@@ -676,4 +675,4 @@ class Acl implements AuditableAclInterface
             $ace->setStrategy($strategy);
         }
     }
-}
+}

+ 3 - 3
src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php

@@ -176,7 +176,7 @@ class DoctrineAclCache implements AclCacheInterface
 
         $aceClassFieldProperty = new \ReflectionProperty($acl, 'classFieldAces');
         $aceClassFieldProperty->setAccessible(true);
-        foreach ($aceClassFieldProperty->getValue($acl) as $field => $aces) {
+        foreach ($aceClassFieldProperty->getValue($acl) as $aces) {
             foreach ($aces as $ace) {
                 $aceAclProperty->setValue($ace, $acl);
             }
@@ -185,7 +185,7 @@ class DoctrineAclCache implements AclCacheInterface
 
         $aceObjectFieldProperty = new \ReflectionProperty($acl, 'objectFieldAces');
         $aceObjectFieldProperty->setAccessible(true);
-        foreach ($aceObjectFieldProperty->getValue($acl) as $field => $aces) {
+        foreach ($aceObjectFieldProperty->getValue($acl) as $aces) {
             foreach ($aces as $ace) {
                 $aceAclProperty->setValue($ace, $acl);
             }
@@ -219,4 +219,4 @@ class DoctrineAclCache implements AclCacheInterface
     {
         return $this->prefix.$aclId;
     }
-}
+}

+ 1 - 2
src/Symfony/Component/Security/Acl/Domain/Entry.php

@@ -14,7 +14,6 @@ namespace Symfony\Component\Security\Acl\Domain;
 use Symfony\Component\Security\Acl\Model\AclInterface;
 use Symfony\Component\Security\Acl\Model\AuditableEntryInterface;
 use Symfony\Component\Security\Acl\Model\EntryInterface;
-use Symfony\Component\Security\Acl\Model\PermissionInterface;
 use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
 
 /**
@@ -212,4 +211,4 @@ class Entry implements AuditableEntryInterface
              $this->granting
         ) = unserialize($serialized);
     }
-}
+}

+ 1 - 2
src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php

@@ -17,7 +17,6 @@ use Symfony\Component\Security\Acl\Model\AclInterface;
 use Symfony\Component\Security\Acl\Model\AuditLoggerInterface;
 use Symfony\Component\Security\Acl\Model\EntryInterface;
 use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface;
-use Symfony\Component\Security\Acl\Model\PermissionInterface;
 use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
 
 /**
@@ -226,4 +225,4 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface
             throw new \RuntimeException(sprintf('The strategy "%s" is not supported.', $strategy));
         }
     }
-}
+}

+ 1 - 1
src/Symfony/Component/Security/Acl/Voter/AclVoter.php

@@ -141,4 +141,4 @@ class AclVoter implements VoterInterface
     {
         return true;
     }
-}
+}

+ 1 - 1
src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php

@@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Http\EntryPoint;
 use Symfony\Component\EventDispatcher\EventInterface;
 use Symfony\Component\Security\Core\Exception\AuthenticationException;
 use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
-use Symfony\Component\Security\Core\Exception\NonceExpiredException;
+use Symfony\Component\HttpKernel\Security\EntryPoint\NonceExpiredException;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Log\LoggerInterface;

+ 1 - 0
src/Symfony/Component/Security/Http/EntryPoint/FormAuthenticationEntryPoint.php

@@ -17,6 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\Security\Core\Exception\AuthenticationException;
 use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
 use Symfony\Component\Security\Core\SecurityContext;
+use Symfony\Component\HttpKernel\HttpKernelInterface;
 
 /**
  * FormAuthenticationEntryPoint starts an authentication via a login form.

+ 0 - 2
src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php

@@ -62,8 +62,6 @@ class AnonymousAuthenticationListener implements ListenerInterface
      */
     public function handle(EventInterface $event)
     {
-        $request = $event->get('request');
-
         if (null !== $this->context->getToken()) {
             return;
         }

+ 2 - 1
src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php

@@ -21,7 +21,7 @@ use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
 use Symfony\Component\Security\Core\Exception\BadCredentialsException;
 use Symfony\Component\Security\Core\Exception\AuthenticationServiceException;
 use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
-use Symfony\Component\Security\Http\EntryPoint\NonceExpiredException;
+use Symfony\Component\HttpKernel\Security\EntryPoint\NonceExpiredException;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Security\Core\Exception\AuthenticationException;
 
@@ -87,6 +87,7 @@ class DigestAuthenticationListener implements ListenerInterface
                 return;
             }
 
+            // FIXME
             if ($token instanceof UsernamePasswordToken && $token->isAuthenticated() && (string) $token === $username) {
                 return;
             }

+ 0 - 1
src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php

@@ -12,7 +12,6 @@
 namespace Symfony\Component\Security\Http\Firewall;
 
 use Symfony\Component\HttpFoundation\Response;
-use Symfony\Bundle\SecurityBundle\Security\AccessDeniedHandler;
 use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface;
 use Symfony\Component\Security\Core\SecurityContext;
 use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface;

+ 1 - 1
src/Symfony/Component/Security/Http/FirewallMap.php

@@ -4,7 +4,7 @@ namespace Symfony\Component\Security\Http;
 
 use Symfony\Component\HttpFoundation\RequestMatcherInterface;
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpKernel\Security\Firewall\ExceptionListener;
+use Symfony\Component\Security\Http\Firewall\ExceptionListener;
 
 /*
  * This file is part of the Symfony framework.

+ 1 - 1
src/Symfony/Component/Serializer/Encoder/XmlEncoder.php

@@ -233,7 +233,7 @@ class XmlEncoder extends AbstractEncoder
      */
     protected function appendDocumentFragment($node, $fragment)
     {
-        if ($fragment instanceof DOMDocumentFragment) {
+        if ($fragment instanceof \DOMDocumentFragment) {
             $node->appendChild($fragment);
             return true;
         }

+ 0 - 1
src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

@@ -75,7 +75,6 @@ class GetSetMethodNormalizer extends AbstractNormalizer
         if ($constructor) {
             $constructorParameters = $constructor->getParameters();
 
-            $attributeNames = array_keys($data);
             $params = array();
             foreach ($constructorParameters as $constructorParameter) {
                 $paramName = strtolower($constructorParameter->getName());

+ 1 - 1
src/Symfony/Component/Templating/PhpEngine.php

@@ -409,7 +409,7 @@ class PhpEngine implements EngineInterface, \ArrayAccess
                 function ($value) use ($that)
                 {
                     if ('UTF-8' != $that->getCharset()) {
-                        $string = $that->convertEncoding($string, 'UTF-8', $that->getCharset());
+                        $string = $that->convertEncoding($value, 'UTF-8', $that->getCharset());
                     }
 
                     $callback = function ($matches) use ($that)

+ 1 - 1
src/Symfony/Component/Translation/PluralizationRules.php

@@ -207,7 +207,7 @@ class PluralizationRules
         }
 
         if (!is_callable($rule)) {
-            throw new Exception('The given rule can not be called');
+            throw new \LogicException('The given rule can not be called');
         }
 
         self::$rules[$locale] = $rule;

+ 2 - 2
src/Symfony/Component/Validator/Constraints/EmailValidator.php

@@ -63,6 +63,6 @@ class EmailValidator extends ConstraintValidator
             return checkdnsrr($host, 'MX');
         }
 
-        throw new ValidatorError('Could not retrieve DNS record information. Remove check_mx = true to prevent this warning');
+        throw new \LogicException('Could not retrieve DNS record information. Remove check_mx = true to prevent this warning');
     }
-}
+}

+ 2 - 1
src/Symfony/Component/Validator/Constraints/ExecuteValidator.php

@@ -14,6 +14,7 @@ namespace Symfony\Component\Validator\Constraints;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
 use Symfony\Component\Validator\Exception\UnexpectedTypeException;
+use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
 
 /**
  * Validator for Execute constraint
@@ -53,4 +54,4 @@ class ExecuteValidator extends ConstraintValidator
 
         return true;
     }
-}
+}

+ 3 - 3
src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php

@@ -1,8 +1,8 @@
 <?php
 
-namespace Symfony\Components\Validator\Mapping\Cache;
+namespace Symfony\Component\Validator\Mapping\Cache;
 
-use Symfony\Components\Validator\Mapping\ClassMetadata;
+use Symfony\Component\Validator\Mapping\ClassMetadata;
 
 class ApcCache implements CacheInterface
 {
@@ -32,4 +32,4 @@ class ApcCache implements CacheInterface
     {
         return 'Symfony\Components\Validator:'.$class;
     }
-}
+}

+ 1 - 2
src/Symfony/Component/Validator/Mapping/Loader/FileLoader.php

@@ -13,7 +13,6 @@ namespace Symfony\Component\Validator\Mapping\Loader;
 
 use Symfony\Component\Validator\Exception\MappingException;
 use Symfony\Component\Validator\Mapping\ClassMetadata;
-use Symfony\Component\Validator\Mapping\GroupMetadata;
 
 abstract class FileLoader implements LoaderInterface
 {
@@ -66,4 +65,4 @@ abstract class FileLoader implements LoaderInterface
 
         return new $className($options);
     }
-}
+}

+ 1 - 1
src/Symfony/Component/Yaml/Parser.php

@@ -130,7 +130,7 @@ class Parser
                             }
                         } else {
                             // Associative array, merge
-                            $merged = array_merge($merge, $parsed);
+                            $merged = array_merge($merged, $parsed);
                         }
 
                         $isProcessed = $merged;