From de39bd543319b74e3e51159210187f47afd19713 Mon Sep 17 00:00:00 2001 From: bronze1man Date: Wed, 18 Sep 2013 20:41:53 +0800 Subject: [PATCH] Fix some annotates --- .../Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php | 1 + .../Bridge/Propel1/Security/User/PropelUserProvider.php | 4 ++-- .../Bundle/FrameworkBundle/Routing/DelegatingLoader.php | 1 + .../FrameworkBundle/Templating/Asset/PackageFactory.php | 1 + .../Bundle/TwigBundle/Loader/FilesystemLoader.php | 1 + src/Symfony/Component/ClassLoader/ClassMapGenerator.php | 2 +- .../Component/Config/Definition/Builder/ExprBuilder.php | 1 + src/Symfony/Component/Console/Application.php | 4 ++-- src/Symfony/Component/Console/Command/Command.php | 2 +- .../Component/Console/Formatter/OutputFormatter.php | 2 +- src/Symfony/Component/Console/Input/InputDefinition.php | 2 +- src/Symfony/Component/Console/Tester/CommandTester.php | 2 ++ .../Component/CssSelector/Node/CombinedSelectorNode.php | 1 + src/Symfony/Component/CssSelector/Node/NodeInterface.php | 3 +++ .../DependencyInjection/Extension/ExtensionInterface.php | 2 +- src/Symfony/Component/Form/CallbackTransformer.php | 3 +++ src/Symfony/Component/Form/Form.php | 2 +- .../Component/HttpFoundation/BinaryFileResponse.php | 4 ++-- src/Symfony/Component/HttpKernel/Client.php | 1 + src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php | 2 +- .../Event/GetResponseForControllerResultEvent.php | 2 +- .../HttpKernel/Fragment/FragmentRendererInterface.php | 1 + .../HttpKernel/Profiler/RedisProfilerStorage.php | 9 ++++----- src/Symfony/Component/Locale/Locale.php | 8 ++++---- .../Component/Locale/Stub/DateFormat/FullTransformer.php | 2 +- .../Routing/Matcher/Dumper/MatcherDumperInterface.php | 2 ++ .../Component/Security/Acl/Domain/AclCollectionCache.php | 1 + .../Component/Security/Acl/Model/AclInterface.php | 2 ++ .../Security/Acl/Model/AclProviderInterface.php | 2 ++ .../Core/Authentication/RememberMe/PersistentToken.php | 2 +- .../Authentication/RememberMe/TokenProviderInterface.php | 2 ++ .../Core/Authentication/Token/AnonymousToken.php | 2 ++ .../Core/Authentication/Token/UsernamePasswordToken.php | 2 ++ .../Component/Security/Core/User/UserInterface.php | 2 ++ .../AuthenticationFailureHandlerInterface.php | 1 + .../AuthenticationSuccessHandlerInterface.php | 1 + .../Http/Authorization/AccessDeniedHandlerInterface.php | 1 + .../EntryPoint/AuthenticationEntryPointInterface.php | 1 + .../Component/Security/Http/Firewall/LogoutListener.php | 1 + src/Symfony/Component/Security/Http/HttpUtils.php | 1 + .../Http/Logout/LogoutSuccessHandlerInterface.php | 1 + .../Security/Tests/Acl/Dbal/MutableAclProviderTest.php | 2 +- .../Http/RememberMe/TokenBasedRememberMeServicesTest.php | 1 - src/Symfony/Component/Serializer/Encoder/XmlEncoder.php | 2 +- src/Symfony/Component/Templating/Loader/ChainLoader.php | 2 +- .../Component/Templating/Loader/LoaderInterface.php | 1 + .../Component/Translation/Loader/LoaderInterface.php | 1 + .../Validator/Mapping/Loader/AbstractLoader.php | 1 + .../Component/Validator/Mapping/Loader/XmlFileLoader.php | 2 +- src/Symfony/Component/Yaml/Exception/ParseException.php | 4 ++-- src/Symfony/Component/Yaml/Unescaper.php | 4 ++-- 51 files changed, 73 insertions(+), 34 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php index ef9eb14bf5..bd3080d928 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php @@ -14,6 +14,7 @@ namespace Symfony\Bridge\Doctrine\Form\ChoiceList; use Symfony\Component\Form\Exception\UnexpectedTypeException; use Doctrine\ORM\QueryBuilder; use Doctrine\DBAL\Connection; +use Doctrine\ORM\EntityManager; /** * Getting Entities through the ORM QueryBuilder diff --git a/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php b/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php index 11a14fdb54..dd88674cbe 100644 --- a/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php +++ b/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php @@ -47,8 +47,8 @@ class PropelUserProvider implements UserProviderInterface /** * Default constructor * - * @param $class The User model class. - * @param $property The property to use to retrieve a user. + * @param string $class The User model class. + * @param string|null $property The property to use to retrieve a user. */ public function __construct($class, $property = null) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php index e0ec390f1e..4d0e849edc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php @@ -15,6 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser; use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoader; use Symfony\Component\Config\Loader\LoaderResolverInterface; use Psr\Log\LoggerInterface; +use Symfony\Component\Routing\RouteCollection; /** * DelegatingLoader delegates route loading to other loaders using a loader resolver. diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PackageFactory.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PackageFactory.php index de36a32831..0a63a29cd6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PackageFactory.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PackageFactory.php @@ -13,6 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Templating\Asset; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Templating\Asset\PackageInterface; /** * Creates packages based on whether the current request is secure. diff --git a/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php b/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php index 94c930fef2..f76b5d0b8e 100644 --- a/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php +++ b/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php @@ -13,6 +13,7 @@ namespace Symfony\Bundle\TwigBundle\Loader; use Symfony\Component\Templating\TemplateNameParserInterface; use Symfony\Component\Config\FileLocatorInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; /** * FilesystemLoader extends the default Twig filesystem loader diff --git a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php index b0e6580df6..0c469481eb 100644 --- a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php +++ b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -39,7 +39,7 @@ class ClassMapGenerator /** * Iterate over all files in the given directory searching for classes * - * @param Iterator|string $dir The directory to search in or an iterator + * @param \Iterator|string $dir The directory to search in or an iterator * * @return array A class map array */ diff --git a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php index 7e06944cd1..9bbbcadc18 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php @@ -10,6 +10,7 @@ */ namespace Symfony\Component\Config\Definition\Builder; + use Symfony\Component\Config\Definition\Exception\UnsetKeyException; /** diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 49ef6224f7..cc9b6ece92 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -736,7 +736,7 @@ class Application * @param string $namespace An optional namespace name * @param Boolean $asDom Whether to return a DOM or an XML string * - * @return string|DOMDocument An XML string representing the Application + * @return string|\DOMDocument An XML string representing the Application */ public function asXml($namespace = null, $asDom = false) { @@ -787,7 +787,7 @@ class Application /** * Renders a caught exception. * - * @param Exception $e An exception instance + * @param \Exception $e An exception instance * @param OutputInterface $output An OutputInterface instance */ public function renderException($e, $output) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 963e777dfe..46411f928e 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -597,7 +597,7 @@ class Command * * @param Boolean $asDom Whether to return a DOM or an XML string * - * @return string|DOMDocument An XML string representing the command + * @return string|\DOMDocument An XML string representing the command */ public function asXml($asDom = false) { diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/Symfony/Component/Console/Formatter/OutputFormatter.php index 36721601ed..8091f009f5 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatter.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -45,7 +45,7 @@ class OutputFormatter implements OutputFormatterInterface * Initializes console output formatter. * * @param Boolean $decorated Whether this formatter should actually decorate strings - * @param FormatterStyle[] $styles Array of "name => FormatterStyle" instances + * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances * * @api */ diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index 69d2f1efe1..eb9c19bfa4 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -475,7 +475,7 @@ class InputDefinition * * @param Boolean $asDom Whether to return a DOM or an XML string * - * @return string|DOMDocument An XML string representing the InputDefinition + * @return string|\DOMDocument An XML string representing the InputDefinition */ public function asXml($asDom = false) { diff --git a/src/Symfony/Component/Console/Tester/CommandTester.php b/src/Symfony/Component/Console/Tester/CommandTester.php index c84057400e..336e343830 100644 --- a/src/Symfony/Component/Console/Tester/CommandTester.php +++ b/src/Symfony/Component/Console/Tester/CommandTester.php @@ -14,6 +14,8 @@ namespace Symfony\Component\Console\Tester; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\StreamOutput; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; /** * Eases the testing of console commands. diff --git a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php index 13e39270e0..2f14ad9421 100644 --- a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php @@ -12,6 +12,7 @@ namespace Symfony\Component\CssSelector\Node; use Symfony\Component\CssSelector\Exception\ParseException; +use Symfony\Component\CssSelector\XPathExpr; /** * CombinedSelectorNode represents a combinator node. diff --git a/src/Symfony/Component/CssSelector/Node/NodeInterface.php b/src/Symfony/Component/CssSelector/Node/NodeInterface.php index 113b1b75d7..2717253f94 100644 --- a/src/Symfony/Component/CssSelector/Node/NodeInterface.php +++ b/src/Symfony/Component/CssSelector/Node/NodeInterface.php @@ -11,6 +11,9 @@ namespace Symfony\Component\CssSelector\Node; +use Symfony\Component\CssSelector\XPathExpr; +use Symfony\Component\CssSelector\Exception\ParseException; + /** * ClassNode represents a "selector.className" node. * diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php index fc015e1459..424f02088e 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php @@ -28,7 +28,7 @@ interface ExtensionInterface * @param array $config An array of configuration values * @param ContainerBuilder $container A ContainerBuilder instance * - * @throws InvalidArgumentException When provided tag is not defined in this extension + * @throws \InvalidArgumentException When provided tag is not defined in this extension * * @api */ diff --git a/src/Symfony/Component/Form/CallbackTransformer.php b/src/Symfony/Component/Form/CallbackTransformer.php index 1dfe890027..b35da45bc7 100644 --- a/src/Symfony/Component/Form/CallbackTransformer.php +++ b/src/Symfony/Component/Form/CallbackTransformer.php @@ -11,6 +11,9 @@ namespace Symfony\Component\Form; +use Symfony\Component\Form\Exception\UnexpectedTypeException; +use Symfony\Component\Form\Exception\TransformationFailedException; + class CallbackTransformer implements DataTransformerInterface { /** diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 6f96732d6e..9914d0189a 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -144,7 +144,7 @@ class Form implements \IteratorAggregate, FormInterface * * @param FormConfigInterface $config The form configuration. * - * @throws FormException if a data mapper is not provided for a compound form + * @throws Exception if a data mapper is not provided for a compound form */ public function __construct(FormConfigInterface $config) { diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index ea46117262..aa212a3ca9 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -34,7 +34,7 @@ class BinaryFileResponse extends Response /** * Constructor. * - * @param SplFileInfo|string $file The file to stream + * @param \SplFileInfo|string $file The file to stream * @param integer $status The response status code * @param array $headers An array of response headers * @param boolean $public Files are public by default @@ -64,7 +64,7 @@ class BinaryFileResponse extends Response /** * Sets the file to stream. * - * @param SplFileInfo|string $file The file to stream + * @param \SplFileInfo|string $file The file to stream * @param string $contentDisposition * @param Boolean $autoEtag * @param Boolean $autoLastModified diff --git a/src/Symfony/Component/HttpKernel/Client.php b/src/Symfony/Component/HttpKernel/Client.php index 6c896749a3..1618885715 100644 --- a/src/Symfony/Component/HttpKernel/Client.php +++ b/src/Symfony/Component/HttpKernel/Client.php @@ -20,6 +20,7 @@ use Symfony\Component\BrowserKit\Cookie as DomCookie; use Symfony\Component\BrowserKit\History; use Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\HttpKernel\TerminableInterface; +use Symfony\Component\HttpFoundation\Response; /** * Client simulates a browser and makes requests to a Kernel object. diff --git a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php index f6b5585c84..59c4af98c8 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php @@ -51,7 +51,7 @@ class ErrorHandler * * @param integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable) * - * @return The registered error handler + * @return ErrorHandler The registered error handler */ public static function register($level = null) { diff --git a/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php b/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php index 1bc0f98fd0..fcb38daaa8 100644 --- a/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php +++ b/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php @@ -56,7 +56,7 @@ class GetResponseForControllerResultEvent extends GetResponseEvent /** * Assigns the return value of the controller. * - * @param mixed The controller return value + * @param mixed $controllerResult The controller return value * * @api */ diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php index a758d2c582..ae172df80d 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php @@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel\Fragment; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpFoundation\Response; /** * Interface implemented by all rendering strategies. diff --git a/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php index d62d6c7996..724485fa04 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\Profiler; -use Redis; /** * RedisProfilerStorage stores profiling information in Redis. @@ -32,7 +31,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface protected $lifetime; /** - * @var Redis + * @var \Redis */ private $redis; @@ -199,7 +198,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface /** * Internal convenience method that returns the instance of Redis. * - * @return Redis + * @return \Redis * * @throws \RuntimeException */ @@ -216,7 +215,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface throw new \RuntimeException('RedisProfilerStorage requires that the redis extension is loaded.'); } - $redis = new Redis; + $redis = new \Redis; $redis->connect($data['host'], $data['port']); if (isset($data['path'])) { @@ -238,7 +237,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface /** * Set instance of the Redis * - * @param Redis $redis + * @param \Redis $redis */ public function setRedis($redis) { diff --git a/src/Symfony/Component/Locale/Locale.php b/src/Symfony/Component/Locale/Locale.php index 271e61d72f..d4a2f6c508 100644 --- a/src/Symfony/Component/Locale/Locale.php +++ b/src/Symfony/Component/Locale/Locale.php @@ -84,7 +84,7 @@ class Locale extends \Locale * Returns all available country codes * * @return array The country codes - * @throws RuntimeException When the resource bundles cannot be loaded + * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getCountries() { @@ -137,7 +137,7 @@ class Locale extends \Locale * Returns all available language codes * * @return array The language codes - * @throws RuntimeException When the resource bundles cannot be loaded + * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getLanguages() { @@ -187,7 +187,7 @@ class Locale extends \Locale * Returns all available locale codes * * @return array The locale codes - * @throws RuntimeException When the resource bundles cannot be loaded + * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getLocales() { @@ -282,7 +282,7 @@ class Locale extends \Locale /** * Returns the fallback locale for a given locale, if any * - * @param $locale The locale to find the fallback for + * @param string $locale The locale to find the fallback for * @return string|null The fallback locale, or null if no parent exists */ protected static function getFallbackLocale($locale) diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php index cdfa558dce..c2cec8e5c5 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php @@ -102,7 +102,7 @@ class FullTransformer * Return the formatted ICU value for the matched date characters * * @param string $dateChars The date characters to be replaced with a formatted ICU value - * @param DateTime $dateTime A DateTime object to be used to generate the formatted value + * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value * * @return string The formatted value * diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php index f85e4ceff0..5e7c134b9f 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Routing\Matcher\Dumper; +use Symfony\Component\Routing\RouteCollection; + /** * MatcherDumperInterface is the interface that all matcher dumper classes must implement. * diff --git a/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php b/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php index d3a4b3799b..5dfef08839 100644 --- a/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php +++ b/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php @@ -14,6 +14,7 @@ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Model\AclProviderInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityRetrievalStrategyInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityRetrievalStrategyInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** * This service caches ACLs for an entire collection of objects. diff --git a/src/Symfony/Component/Security/Acl/Model/AclInterface.php b/src/Symfony/Component/Security/Acl/Model/AclInterface.php index fffe59166f..02bbd008e5 100644 --- a/src/Symfony/Component/Security/Acl/Model/AclInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AclInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Acl\Model; +use Symfony\Component\Security\Acl\Exception\NoAceFoundException; + /** * This interface represents an access control list (ACL) for a domain object. * Each domain object can have exactly one associated ACL. diff --git a/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php b/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php index 4be49bfc0a..615cf145ac 100644 --- a/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Acl\Model; +use Symfony\Component\Security\Acl\Exception\AclNotFoundException; + /** * Provides a common interface for retrieving ACLs. * diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php index f3f6858e2c..8919be9f66 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php @@ -100,7 +100,7 @@ final class PersistentToken implements PersistentTokenInterface /** * Returns the time the token was last used * - * @return DateTime + * @return \DateTime */ public function getLastUsed() { diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php index 0c6f75e03d..39a4ebe486 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core\Authentication\RememberMe; +use Symfony\Component\Security\Core\Exception\TokenNotFoundException; + /** * Interface for TokenProviders * diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php index 9b0a084338..cabb6d5fd3 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core\Authentication\Token; +use Symfony\Component\Security\Core\Role\RoleInterface; + /** * AnonymousToken represents an anonymous token. * diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php index d6e3998f1f..3854242f25 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core\Authentication\Token; +use Symfony\Component\Security\Core\Role\RoleInterface; + /** * UsernamePasswordToken implements a username and password token. * diff --git a/src/Symfony/Component/Security/Core/User/UserInterface.php b/src/Symfony/Component/Security/Core/User/UserInterface.php index 6e9b0f1899..1b52dab996 100644 --- a/src/Symfony/Component/Security/Core/User/UserInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core\User; +use Symfony\Component\Security\Core\Role\Role; + /** * Represents the interface that all user classes must implement. * diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php index 8dbd29a7f6..e2d375e754 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Authentication; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; /** * Interface for custom authentication failure handlers. diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php index 5c08e73cce..9ec64b4493 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Authentication; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; /** * Interface for a custom authentication success handler diff --git a/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php b/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php index a10a5d0f9d..5f60fd6aa1 100644 --- a/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Authorization; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\HttpFoundation\Response; /** * This is used by the ExceptionListener to translate an AccessDeniedException diff --git a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php index d190fc7b88..0d7595d407 100644 --- a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php +++ b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\EntryPoint; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; /** * AuthenticationEntryPointInterface is the interface used to start the diff --git a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php index ca2f4394d3..653c64429b 100644 --- a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php @@ -20,6 +20,7 @@ use Symfony\Component\Security\Core\Exception\LogoutException; use Symfony\Component\Security\Http\HttpUtils; use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface; use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface; +use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException; /** * LogoutListener logout users. diff --git a/src/Symfony/Component/Security/Http/HttpUtils.php b/src/Symfony/Component/Security/Http/HttpUtils.php index 0453520a58..c3ff865bae 100644 --- a/src/Symfony/Component/Security/Http/HttpUtils.php +++ b/src/Symfony/Component/Security/Http/HttpUtils.php @@ -20,6 +20,7 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\HttpFoundation\Response; /** * Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs. diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php b/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php index 61642a8b5f..4246fa4414 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Http\Logout; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; /** * LogoutSuccesshandlerInterface. diff --git a/src/Symfony/Component/Security/Tests/Acl/Dbal/MutableAclProviderTest.php b/src/Symfony/Component/Security/Tests/Acl/Dbal/MutableAclProviderTest.php index 3e8d65fc4e..edcdd4d6d5 100644 --- a/src/Symfony/Component/Security/Tests/Acl/Dbal/MutableAclProviderTest.php +++ b/src/Symfony/Component/Security/Tests/Acl/Dbal/MutableAclProviderTest.php @@ -372,7 +372,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase * @param AclProvider $provider * @param array $data * @throws \InvalidArgumentException - * @throws Exception + * @throws \Exception */ protected function importAcls(AclProvider $provider, array $data) { diff --git a/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php b/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php index 6de69f1d03..4699257fa3 100644 --- a/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php @@ -14,7 +14,6 @@ namespace Symfony\Component\Security\Tests\Http\RememberMe; use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; -use Symfony\Component\Security\Core\Authentication\Token\Token; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index 0c77a16a9e..7923a75a1f 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -148,7 +148,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec } /** - * @param DOMNode $node + * @param \DOMNode $node * @param string $val * * @return Boolean diff --git a/src/Symfony/Component/Templating/Loader/ChainLoader.php b/src/Symfony/Component/Templating/Loader/ChainLoader.php index 0eec8e570e..56bedb7118 100644 --- a/src/Symfony/Component/Templating/Loader/ChainLoader.php +++ b/src/Symfony/Component/Templating/Loader/ChainLoader.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Templating\Loader; -use Symfony\Component\Templating\Storage; +use Symfony\Component\Templating\Storage\Storage; use Symfony\Component\Templating\TemplateReferenceInterface; /** diff --git a/src/Symfony/Component/Templating/Loader/LoaderInterface.php b/src/Symfony/Component/Templating/Loader/LoaderInterface.php index 4b6d52562d..3f96222b11 100644 --- a/src/Symfony/Component/Templating/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Templating/Loader/LoaderInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Templating\Loader; use Symfony\Component\Templating\TemplateReferenceInterface; +use Symfony\Component\Templating\Storage\Storage; /** * LoaderInterface is the interface all loaders must implement. diff --git a/src/Symfony/Component/Translation/Loader/LoaderInterface.php b/src/Symfony/Component/Translation/Loader/LoaderInterface.php index 4d9965ce99..0b28e14a0d 100644 --- a/src/Symfony/Component/Translation/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Translation/Loader/LoaderInterface.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Translation\Loader; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; /** * LoaderInterface is the interface implemented by all translation loaders. diff --git a/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php index 54c0dbe474..7015f92d42 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Validator\Mapping\Loader; use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Constraint; abstract class AbstractLoader implements LoaderInterface { diff --git a/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php index a9ae396777..cad247e883 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php @@ -183,7 +183,7 @@ class XmlFileLoader extends FileLoader * * @param string $file Path of file * - * @return SimpleXMLElement + * @return \SimpleXMLElement * * @throws MappingException */ diff --git a/src/Symfony/Component/Yaml/Exception/ParseException.php b/src/Symfony/Component/Yaml/Exception/ParseException.php index a27a005e6f..dad166d7c4 100644 --- a/src/Symfony/Component/Yaml/Exception/ParseException.php +++ b/src/Symfony/Component/Yaml/Exception/ParseException.php @@ -32,9 +32,9 @@ class ParseException extends RuntimeException * @param integer $parsedLine The line where the error occurred * @param integer $snippet The snippet of code near the problem * @param string $parsedFile The file name where the error occurred - * @param Exception $previous The previous exception + * @param \Exception $previous The previous exception */ - public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, Exception $previous = null) + public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, \Exception $previous = null) { $this->parsedFile = $parsedFile; $this->parsedLine = $parsedLine; diff --git a/src/Symfony/Component/Yaml/Unescaper.php b/src/Symfony/Component/Yaml/Unescaper.php index 708f2a18f2..ac3a576b67 100644 --- a/src/Symfony/Component/Yaml/Unescaper.php +++ b/src/Symfony/Component/Yaml/Unescaper.php @@ -130,7 +130,7 @@ class Unescaper * * @return string The string with the new encoding * - * @throws RuntimeException if no suitable encoding function is found (iconv or mbstring) + * @throws \RuntimeException if no suitable encoding function is found (iconv or mbstring) */ private function convertEncoding($value, $to, $from) { @@ -140,6 +140,6 @@ class Unescaper return iconv($from, $to, $value); } - throw new RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).'); + throw new \RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).'); } }