Skip to content

@throws annotations should go after @return #18975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Twig/NodeVisitor/Scope.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public function leave()
* @param string $key
* @param mixed $value
*
* @throws \LogicException
*
* @return Scope Current scope
*
* @throws \LogicException
*/
public function set($key, $value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
/**
* @param string $file
*
* @throws \InvalidArgumentException
*
* @return bool
*
* @throws \InvalidArgumentException
*/
protected function canBeExtracted($file)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public function getName()
*
* @param string $url The URL that has to be absolute
*
* @throws \RuntimeException
*
* @return string The absolute URL
*
* @throws \RuntimeException
*/
private function ensureUrlIsAbsolute($url)
{
Expand Down
16 changes: 8 additions & 8 deletions src/Symfony/Component/CssSelector/Parser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public function parse($source)
*
* @param Token[] $tokens
*
* @throws SyntaxErrorException
*
* @return array
*
* @throws SyntaxErrorException
*/
public static function parseSeries(array $tokens)
{
Expand Down Expand Up @@ -131,9 +131,9 @@ private function parseSelectorList(TokenStream $stream)
*
* @param TokenStream $stream
*
* @throws SyntaxErrorException
*
* @return Node\SelectorNode
*
* @throws SyntaxErrorException
*/
private function parserSelectorNode(TokenStream $stream)
{
Expand Down Expand Up @@ -171,9 +171,9 @@ private function parserSelectorNode(TokenStream $stream)
* @param TokenStream $stream
* @param bool $insideNegation
*
* @throws SyntaxErrorException
*
* @return array
*
* @throws SyntaxErrorException
*/
private function parseSimpleSelector(TokenStream $stream, $insideNegation = false)
{
Expand Down Expand Up @@ -328,9 +328,9 @@ private function parseElementNode(TokenStream $stream)
* @param Node\NodeInterface $selector
* @param TokenStream $stream
*
* @throws SyntaxErrorException
*
* @return Node\AttributeNode
*
* @throws SyntaxErrorException
*/
private function parseAttributeNode(Node\NodeInterface $selector, TokenStream $stream)
{
Expand Down
12 changes: 6 additions & 6 deletions src/Symfony/Component/CssSelector/Parser/TokenStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public function freeze()
/**
* Returns next token.
*
* @throws InternalErrorException If there is no more token
*
* @return Token
*
* @throws InternalErrorException If there is no more token
*/
public function getNext()
{
Expand Down Expand Up @@ -131,9 +131,9 @@ public function getUsed()
/**
* 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()
{
Expand All @@ -149,9 +149,9 @@ public function getNextIdentifier()
/**
* 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()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/CssSelector/XPath/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ public function addPseudoClass(XPathExpr $xpath, $pseudoClass)
* @param string $attribute
* @param string $value
*
* @throws ExpressionErrorException
*
* @return XPathExpr
*
* @throws ExpressionErrorException
*/
public function addAttributeMatching(XPathExpr $xpath, $operator, $attribute, $value)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/EventDispatcher/GenericEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public function getSubject()
*
* @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)
{
Expand Down Expand Up @@ -130,9 +130,9 @@ public function hasArgument($key)
*
* @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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Finder/Expression/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ public function isGlob()
}

/**
* @throws \LogicException
*
* @return Glob
*
* @throws \LogicException
*/
public function getGlob()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Finder/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ public function useBestAdapter()
*
* @param string $name
*
* @throws \InvalidArgumentException
*
* @return Finder The current Finder instance
*
* @throws \InvalidArgumentException
*/
public function setAdapter($name)
{
Expand Down
16 changes: 8 additions & 8 deletions src/Symfony/Component/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1072,9 +1072,9 @@ public function createView(FormView $parent = null)
*
* @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)
{
Expand All @@ -1098,9 +1098,9 @@ private function modelToNorm($value)
*
* @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)
{
Expand All @@ -1126,9 +1126,9 @@ private function normToModel($value)
*
* @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)
{
Expand Down Expand Up @@ -1161,9 +1161,9 @@ private function normToView($value)
*
* @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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ public function removeCookie($name, $path = '/', $domain = null)
*
* @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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ public function getKernel()
/**
* Gets the Surrogate instance.
*
* @throws \LogicException
*
* @return SurrogateInterface A Surrogate instance
*
* @throws \LogicException
*/
public function getSurrogate()
{
Expand All @@ -169,10 +169,10 @@ public function getSurrogate()
/**
* 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()
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ public function getOutput()
* 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()
{
Expand Down Expand Up @@ -536,10 +536,10 @@ public function getErrorOutput()
* 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()
{
Expand Down
20 changes: 10 additions & 10 deletions src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,9 @@ protected function getInsertObjectIdentitySql($identifier, $classId, $entriesInh
*
* @param SecurityIdentityInterface $sid
*
* @throws \InvalidArgumentException
*
* @return string
*
* @throws \InvalidArgumentException
*/
protected function getInsertSecurityIdentitySql(SecurityIdentityInterface $sid)
{
Expand Down Expand Up @@ -626,9 +626,9 @@ protected function getSelectClassIdSql($classType)
*
* @param SecurityIdentityInterface $sid
*
* @throws \InvalidArgumentException
*
* @return string
*
* @throws \InvalidArgumentException
*/
protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid)
{
Expand All @@ -655,9 +655,9 @@ protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid
*
* @param SecurityIdentityInterface $sid
*
* @throws \InvalidArgumentException
*
* @return string
*
* @throws \InvalidArgumentException
*/
protected function getDeleteSecurityIdentityIdSql(SecurityIdentityInterface $sid)
{
Expand All @@ -673,9 +673,9 @@ protected function getDeleteSecurityIdentityIdSql(SecurityIdentityInterface $sid
* @param int $pk
* @param array $changes
*
* @throws \InvalidArgumentException
*
* @return string
*
* @throws \InvalidArgumentException
*/
protected function getUpdateObjectIdentitySql($pk, array $changes)
{
Expand Down Expand Up @@ -723,9 +723,9 @@ protected function getUpdateUserSecurityIdentitySql(UserSecurityIdentity $usid,
* @param int $pk
* @param array $sets
*
* @throws \InvalidArgumentException
*
* @return string
*
* @throws \InvalidArgumentException
*/
protected function getUpdateAccessControlEntrySql($pk, array $sets)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function __construct($identifier, $type)
*
* @param object $domainObject
*
* @throws InvalidDomainObjectException
*
* @return ObjectIdentity
*
* @throws InvalidDomainObjectException
*/
public static function fromDomainObject($domainObject)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Security/Acl/Model/AclInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ public function isFieldGranted($field, array $masks, array $securityIdentities,
* @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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Loading