From bf3a2c0abd48927ede8d2820c98838762ba6339d Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 6 Jun 2016 11:38:47 +0200 Subject: [PATCH] `@throws` annotations should go after `@return` --- src/Symfony/Bridge/Twig/NodeVisitor/Scope.php | 4 ++-- .../Translation/PhpExtractor.php | 4 ++-- .../TwigBundle/Extension/AssetsExtension.php | 4 ++-- .../Component/CssSelector/Parser/Parser.php | 16 +++++++-------- .../CssSelector/Parser/TokenStream.php | 12 +++++------ .../CssSelector/XPath/Translator.php | 4 ++-- .../EventDispatcher/GenericEvent.php | 8 ++++---- .../Finder/Expression/Expression.php | 4 ++-- src/Symfony/Component/Finder/Finder.php | 4 ++-- src/Symfony/Component/Form/Form.php | 16 +++++++-------- .../HttpFoundation/ResponseHeaderBag.php | 4 ++-- .../Storage/SessionStorageInterface.php | 4 ++-- .../HttpKernel/HttpCache/HttpCache.php | 8 ++++---- src/Symfony/Component/Process/Process.php | 8 ++++---- .../Security/Acl/Dbal/MutableAclProvider.php | 20 +++++++++---------- .../Security/Acl/Domain/ObjectIdentity.php | 4 ++-- .../Security/Acl/Model/AclInterface.php | 4 ++-- .../Acl/Model/MutableAclProviderInterface.php | 4 ++-- .../Security/Acl/Permission/MaskBuilder.php | 4 ++-- .../Serializer/Encoder/XmlEncoder.php | 4 ++-- .../Normalizer/DenormalizableInterface.php | 4 ---- .../Normalizer/DenormalizerInterface.php | 4 ---- .../Normalizer/NormalizableInterface.php | 4 ---- .../Normalizer/NormalizerInterface.php | 4 ---- .../Serializer/SerializerInterface.php | 6 ------ .../Component/Stopwatch/StopwatchEvent.php | 2 -- .../Extractor/AbstractFileExtractor.php | 4 ++-- .../Translation/Loader/XliffFileLoader.php | 3 +-- .../Translation/TranslatorBagInterface.php | 4 ++-- .../Translation/TranslatorInterface.php | 8 ++++---- 30 files changed, 79 insertions(+), 104 deletions(-) diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php b/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php index 1712bd5afe..f9333bf683 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php @@ -67,9 +67,9 @@ class Scope * @param string $key * @param mixed $value * - * @throws \LogicException - * * @return Scope Current scope + * + * @throws \LogicException */ public function set($key, $value) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php index ca9e7f994c..cf7f3c5769 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php @@ -182,9 +182,9 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface /** * @param string $file * - * @throws \InvalidArgumentException - * * @return bool + * + * @throws \InvalidArgumentException */ protected function canBeExtracted($file) { diff --git a/src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php b/src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php index fc62ef059d..976086920e 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php @@ -95,9 +95,9 @@ class AssetsExtension extends \Twig_Extension * * @param string $url The URL that has to be absolute * - * @throws \RuntimeException - * * @return string The absolute URL + * + * @throws \RuntimeException */ private function ensureUrlIsAbsolute($url) { diff --git a/src/Symfony/Component/CssSelector/Parser/Parser.php b/src/Symfony/Component/CssSelector/Parser/Parser.php index 9625e3e8a1..8b86bce3b7 100644 --- a/src/Symfony/Component/CssSelector/Parser/Parser.php +++ b/src/Symfony/Component/CssSelector/Parser/Parser.php @@ -56,9 +56,9 @@ class Parser implements ParserInterface * * @param Token[] $tokens * - * @throws SyntaxErrorException - * * @return array + * + * @throws SyntaxErrorException */ public static function parseSeries(array $tokens) { @@ -131,9 +131,9 @@ class Parser implements ParserInterface * * @param TokenStream $stream * - * @throws SyntaxErrorException - * * @return Node\SelectorNode + * + * @throws SyntaxErrorException */ private function parserSelectorNode(TokenStream $stream) { @@ -171,9 +171,9 @@ class Parser implements ParserInterface * @param TokenStream $stream * @param bool $insideNegation * - * @throws SyntaxErrorException - * * @return array + * + * @throws SyntaxErrorException */ private function parseSimpleSelector(TokenStream $stream, $insideNegation = false) { @@ -328,9 +328,9 @@ class Parser implements ParserInterface * @param Node\NodeInterface $selector * @param TokenStream $stream * - * @throws SyntaxErrorException - * * @return Node\AttributeNode + * + * @throws SyntaxErrorException */ private function parseAttributeNode(Node\NodeInterface $selector, TokenStream $stream) { diff --git a/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/Symfony/Component/CssSelector/Parser/TokenStream.php index c0525d7a83..0c166eff22 100644 --- a/src/Symfony/Component/CssSelector/Parser/TokenStream.php +++ b/src/Symfony/Component/CssSelector/Parser/TokenStream.php @@ -83,9 +83,9 @@ class TokenStream /** * Returns next token. * - * @throws InternalErrorException If there is no more token - * * @return Token + * + * @throws InternalErrorException If there is no more token */ public function getNext() { @@ -131,9 +131,9 @@ class TokenStream /** * Returns nex identifier token. * - * @throws SyntaxErrorException If next token is not an identifier - * * @return string The identifier token value + * + * @throws SyntaxErrorException If next token is not an identifier */ public function getNextIdentifier() { @@ -149,9 +149,9 @@ class TokenStream /** * Returns nex identifier or star delimiter token. * - * @throws SyntaxErrorException If next token is not an identifier or a star delimiter - * * @return null|string The identifier token value or null if star found + * + * @throws SyntaxErrorException If next token is not an identifier or a star delimiter */ public function getNextIdentifierOrStar() { diff --git a/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/Symfony/Component/CssSelector/XPath/Translator.php index 5053793ea0..aac2691f1a 100644 --- a/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -266,9 +266,9 @@ class Translator implements TranslatorInterface * @param string $attribute * @param string $value * - * @throws ExpressionErrorException - * * @return XPathExpr + * + * @throws ExpressionErrorException */ public function addAttributeMatching(XPathExpr $xpath, $operator, $attribute, $value) { diff --git a/src/Symfony/Component/EventDispatcher/GenericEvent.php b/src/Symfony/Component/EventDispatcher/GenericEvent.php index 6458180a5a..03cbcfe334 100644 --- a/src/Symfony/Component/EventDispatcher/GenericEvent.php +++ b/src/Symfony/Component/EventDispatcher/GenericEvent.php @@ -61,9 +61,9 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * * @param string $key Key. * - * @throws \InvalidArgumentException If key is not found. - * * @return mixed Contents of array key. + * + * @throws \InvalidArgumentException If key is not found. */ public function getArgument($key) { @@ -130,9 +130,9 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * * @param string $key Array key. * - * @throws \InvalidArgumentException If key does not exist in $this->args. - * * @return mixed + * + * @throws \InvalidArgumentException If key does not exist in $this->args. */ public function offsetGet($key) { diff --git a/src/Symfony/Component/Finder/Expression/Expression.php b/src/Symfony/Component/Finder/Expression/Expression.php index 900260751e..a4f1f219a8 100644 --- a/src/Symfony/Component/Finder/Expression/Expression.php +++ b/src/Symfony/Component/Finder/Expression/Expression.php @@ -123,9 +123,9 @@ class Expression implements ValueInterface } /** - * @throws \LogicException - * * @return Glob + * + * @throws \LogicException */ public function getGlob() { diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index a7c7500e09..c83a024eab 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -128,9 +128,9 @@ class Finder implements \IteratorAggregate, \Countable * * @param string $name * - * @throws \InvalidArgumentException - * * @return Finder The current Finder instance + * + * @throws \InvalidArgumentException */ public function setAdapter($name) { diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 47c38c5718..a395f42708 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -1072,9 +1072,9 @@ class Form implements \IteratorAggregate, FormInterface * * @param mixed $value The value to transform * - * @throws TransformationFailedException If the value cannot be transformed to "normalized" format - * * @return mixed + * + * @throws TransformationFailedException If the value cannot be transformed to "normalized" format */ private function modelToNorm($value) { @@ -1098,9 +1098,9 @@ class Form implements \IteratorAggregate, FormInterface * * @param string $value The value to reverse transform * - * @throws TransformationFailedException If the value cannot be transformed to "model" format - * * @return mixed + * + * @throws TransformationFailedException If the value cannot be transformed to "model" format */ private function normToModel($value) { @@ -1126,9 +1126,9 @@ class Form implements \IteratorAggregate, FormInterface * * @param mixed $value The value to transform * - * @throws TransformationFailedException If the value cannot be transformed to "view" format - * * @return mixed + * + * @throws TransformationFailedException If the value cannot be transformed to "view" format */ private function normToView($value) { @@ -1161,9 +1161,9 @@ class Form implements \IteratorAggregate, FormInterface * * @param string $value The value to reverse transform * - * @throws TransformationFailedException If the value cannot be transformed to "normalized" format - * * @return mixed + * + * @throws TransformationFailedException If the value cannot be transformed to "normalized" format */ private function viewToNorm($value) { diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index 06534aa75b..1d26e86b9b 100644 --- a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -181,9 +181,9 @@ class ResponseHeaderBag extends HeaderBag * * @param string $format * - * @throws \InvalidArgumentException When the $format is invalid - * * @return array + * + * @throws \InvalidArgumentException When the $format is invalid */ public function getCookies($format = self::COOKIES_FLAT) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php index 4b2f5d27aa..206f18e77f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php @@ -24,9 +24,9 @@ interface SessionStorageInterface /** * Starts the session. * - * @throws \RuntimeException If something goes wrong starting the session. - * * @return bool True if started. + * + * @throws \RuntimeException If something goes wrong starting the session. */ public function start(); diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 6075d235b6..f794d94e29 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -153,9 +153,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface /** * Gets the Surrogate instance. * - * @throws \LogicException - * * @return SurrogateInterface A Surrogate instance + * + * @throws \LogicException */ public function getSurrogate() { @@ -169,10 +169,10 @@ class HttpCache implements HttpKernelInterface, TerminableInterface /** * Gets the Esi instance. * - * @throws \LogicException - * * @return Esi An Esi instance * + * @throws \LogicException + * * @deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead */ public function getEsi() diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 08742df2d9..67ea654589 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -477,10 +477,10 @@ class Process * In comparison with the getOutput method which always return the whole * output, this one returns the new output since the last call. * + * @return string The process output since the last call + * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started - * - * @return string The process output since the last call */ public function getIncrementalOutput() { @@ -536,10 +536,10 @@ class Process * whole error output, this one returns the new error output since the last * call. * + * @return string The process error output since the last call + * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started - * - * @return string The process error output since the last call */ public function getIncrementalErrorOutput() { diff --git a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php index 273625a48e..bd1976fa31 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php @@ -554,9 +554,9 @@ QUERY; * * @param SecurityIdentityInterface $sid * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getInsertSecurityIdentitySql(SecurityIdentityInterface $sid) { @@ -626,9 +626,9 @@ QUERY; * * @param SecurityIdentityInterface $sid * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid) { @@ -655,9 +655,9 @@ QUERY; * * @param SecurityIdentityInterface $sid * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getDeleteSecurityIdentityIdSql(SecurityIdentityInterface $sid) { @@ -673,9 +673,9 @@ QUERY; * @param int $pk * @param array $changes * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getUpdateObjectIdentitySql($pk, array $changes) { @@ -723,9 +723,9 @@ QUERY; * @param int $pk * @param array $sets * - * @throws \InvalidArgumentException - * * @return string + * + * @throws \InvalidArgumentException */ protected function getUpdateAccessControlEntrySql($pk, array $sets) { diff --git a/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php b/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php index 871bda7b10..ec817e2e87 100644 --- a/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php +++ b/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php @@ -52,9 +52,9 @@ final class ObjectIdentity implements ObjectIdentityInterface * * @param object $domainObject * - * @throws InvalidDomainObjectException - * * @return ObjectIdentity + * + * @throws InvalidDomainObjectException */ public static function fromDomainObject($domainObject) { diff --git a/src/Symfony/Component/Security/Acl/Model/AclInterface.php b/src/Symfony/Component/Security/Acl/Model/AclInterface.php index 6a70a7c594..13a6cf8394 100644 --- a/src/Symfony/Component/Security/Acl/Model/AclInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AclInterface.php @@ -97,9 +97,9 @@ interface AclInterface extends \Serializable * @param array $securityIdentities * @param bool $administrativeMode * - * @throws NoAceFoundException when no ACE was applicable for this request - * * @return bool + * + * @throws NoAceFoundException when no ACE was applicable for this request */ public function isGranted(array $masks, array $securityIdentities, $administrativeMode = false); diff --git a/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php b/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php index 95f531e09b..ee6d7c406e 100644 --- a/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php @@ -25,10 +25,10 @@ interface MutableAclProviderInterface extends AclProviderInterface * * @param ObjectIdentityInterface $oid * + * @return MutableAclInterface + * * @throws AclAlreadyExistsException when there already is an ACL for the given * object identity - * - * @return MutableAclInterface */ public function createAcl(ObjectIdentityInterface $oid); diff --git a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php index 0b5f388b48..ed13ecb885 100644 --- a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php +++ b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php @@ -96,10 +96,10 @@ class MaskBuilder extends AbstractMaskBuilder * * @param int $mask * + * @return string + * * @throws \InvalidArgumentException * @throws \RuntimeException - * - * @return string */ public static function getCode($mask) { diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index be6688bc3d..4c17fb6b8d 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -460,9 +460,9 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * @param \DOMNode $node * @param mixed $val * - * @throws UnexpectedValueException - * * @return bool + * + * @throws UnexpectedValueException */ private function selectNodeType(\DOMNode $node, $val) { diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php index b515611e78..8ad1386a6c 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\ExceptionInterface; - /** * Defines the most basic interface a class must implement to be denormalizable. * @@ -36,8 +34,6 @@ interface DenormalizableInterface * based on different input formats * @param array $context options for denormalizing * - * @throws ExceptionInterface - * * @return object */ public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()); diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php index a544124f29..8b6c233395 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\ExceptionInterface; - /** * Defines the interface of denormalizers. * @@ -28,8 +26,6 @@ interface DenormalizerInterface * @param string $format format the given data was extracted from * @param array $context options available to the denormalizer * - * @throws ExceptionInterface - * * @return object */ public function denormalize($data, $class, $format = null, array $context = array()); diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php index ac3edb680d..e19fe5ce58 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\ExceptionInterface; - /** * Defines the most basic interface a class must implement to be normalizable. * @@ -35,8 +33,6 @@ interface NormalizableInterface * based on different output formats. * @param array $context Options for normalizing this object * - * @throws ExceptionInterface - * * @return array|scalar */ public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index 333397044b..f4bd355232 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\ExceptionInterface; - /** * Defines the interface of normalizers. * @@ -27,8 +25,6 @@ interface NormalizerInterface * @param string $format format the normalization result will be encoded as * @param array $context Context options for the normalizer * - * @throws ExceptionInterface - * * @return array|scalar */ public function normalize($object, $format = null, array $context = array()); diff --git a/src/Symfony/Component/Serializer/SerializerInterface.php b/src/Symfony/Component/Serializer/SerializerInterface.php index 7d1fb2e465..c79db91892 100644 --- a/src/Symfony/Component/Serializer/SerializerInterface.php +++ b/src/Symfony/Component/Serializer/SerializerInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Serializer; -use Symfony\Component\Serializer\Exception\ExceptionInterface; - /** * Defines the interface of the Serializer. * @@ -27,8 +25,6 @@ interface SerializerInterface * @param string $format format name * @param array $context options normalizers/encoders have access to * - * @throws ExceptionInterface - * * @return string */ public function serialize($data, $format, array $context = array()); @@ -41,8 +37,6 @@ interface SerializerInterface * @param string $format * @param array $context * - * @throws ExceptionInterface - * * @return object */ public function deserialize($data, $type, $format, array $context = array()); diff --git a/src/Symfony/Component/Stopwatch/StopwatchEvent.php b/src/Symfony/Component/Stopwatch/StopwatchEvent.php index 930722d2f5..957a5d0dae 100644 --- a/src/Symfony/Component/Stopwatch/StopwatchEvent.php +++ b/src/Symfony/Component/Stopwatch/StopwatchEvent.php @@ -87,8 +87,6 @@ class StopwatchEvent /** * Stops the last started event period. * - * @throws \LogicException When start wasn't called before stopping - * * @return StopwatchEvent The event * * @throws \LogicException When stop() is called without a matching call to start() diff --git a/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php b/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php index 196bc33410..57fd4938d2 100644 --- a/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php +++ b/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php @@ -54,9 +54,9 @@ abstract class AbstractFileExtractor /** * @param string $file * - * @throws \InvalidArgumentException - * * @return bool + * + * @throws \InvalidArgumentException */ protected function isFile($file) { diff --git a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index 0e335db425..0381a4ca4d 100644 --- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -112,10 +112,9 @@ class XliffFileLoader implements LoaderInterface * * @param string $file * - * @throws \RuntimeException - * * @return \SimpleXMLElement * + * @throws \RuntimeException * @throws InvalidResourceException */ private function parseFile($file) diff --git a/src/Symfony/Component/Translation/TranslatorBagInterface.php b/src/Symfony/Component/Translation/TranslatorBagInterface.php index 6f650b5ee0..14fbb17f5e 100644 --- a/src/Symfony/Component/Translation/TranslatorBagInterface.php +++ b/src/Symfony/Component/Translation/TranslatorBagInterface.php @@ -23,9 +23,9 @@ interface TranslatorBagInterface * * @param string|null $locale The locale or null to use the default * - * @throws \InvalidArgumentException If the locale contains invalid characters - * * @return MessageCatalogueInterface + * + * @throws \InvalidArgumentException If the locale contains invalid characters */ public function getCatalogue($locale = null); } diff --git a/src/Symfony/Component/Translation/TranslatorInterface.php b/src/Symfony/Component/Translation/TranslatorInterface.php index 869e0b9004..6916c335bd 100644 --- a/src/Symfony/Component/Translation/TranslatorInterface.php +++ b/src/Symfony/Component/Translation/TranslatorInterface.php @@ -26,9 +26,9 @@ interface TranslatorInterface * @param string|null $domain The domain for the message or null to use the default * @param string|null $locale The locale or null to use the default * - * @throws \InvalidArgumentException If the locale contains invalid characters - * * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters */ public function trans($id, array $parameters = array(), $domain = null, $locale = null); @@ -41,9 +41,9 @@ interface TranslatorInterface * @param string|null $domain The domain for the message or null to use the default * @param string|null $locale The locale or null to use the default * - * @throws \InvalidArgumentException If the locale contains invalid characters - * * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters */ public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null);