10000 `@throws` annotations should go after `@return` · l3l0/symfony@bf3a2c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf3a2c0

Browse files
@throws annotations should go after @return
1 parent cb850fe commit bf3a2c0

File tree

30 files changed

+79
-104
lines changed

30 files changed

+79
-104
lines changed

src/Symfony/Bridge/Twig/NodeVisitor/Scope.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ public function leave()
6767
* @param string $key
6868
* @param mixed $value
6969
*
70-
* @throws \LogicException
71-
*
7270
* @return Scope Current scope
71+
*
72+
* @throws \LogicException
7373
*/
7474
public function set($key, $value)
7575
{

src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
182182
/**
183183
* @param string $file
184184
*
185-
* @throws \InvalidArgumentException
186-
*
187185
* @return bool
186+
*
187+
* @throws \InvalidArgumentException
188188
*/
189189
protected function canBeExtracted($file)
190190
{

src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ public function getName()
9595
*
9696
* @param string $url The URL that has to be absolute
9797
*
98-
* @throws \RuntimeException
99-
*
10098
* @return string The absolute URL
99+
*
100+
* @throws \RuntimeException
101101
*/
102102
private function ensureUrlIsAbsolute($url)
103103
{

src/Symfony/Component/CssSelector/Parser/Parser.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function parse($source)
5656
*
5757
* @param Token[] $tokens
5858
*
59-
* @throws SyntaxErrorException
60-
*
6159
* @return array
60+
*
61+
* @throws SyntaxErrorException
6262
*/
6363
public static function parseSeries(array $tokens)
6464
{
@@ -131,9 +131,9 @@ private function parseSelectorList(TokenStream $stream)
131131
*
132132
* @param TokenStream $stream
133133
*
134-
* @throws SyntaxErrorException
135-
*
136134
* @return Node\SelectorNode
135+
*
136+
* @throws SyntaxErrorException
137137
*/
138138
private function parserSelectorNode(TokenStream $stream)
139139
{
@@ -171,9 +171,9 @@ private function parserSelectorNode(TokenStream $stream)
171171
* @param TokenStream $stream
172172
* @param bool $insideNegation
173173
*
174-
* @throws SyntaxErrorException
175-
*
176174
* @return array
175+
*
176+
* @throws SyntaxErrorException
177177
*/
178178
private function parseSimpleSelector(TokenStream $stream, $insideNegation = false)
179179
{
@@ -328,9 +328,9 @@ private function parseElementNode(TokenStream $stream)
328328
* @param Node\NodeInterface $selector
329329
* @param TokenStream $stream
330330
*
331-
* @throws SyntaxErrorException
332-
*
333331
* @return Node\AttributeNode
332+
*
333+
* @throws SyntaxErrorException
334334
*/
335335
private function parseAttributeNode(Node\NodeInterface $selector, TokenStream $stream)
336336
{

src/Symfony/Component/CssSelector/Parser/TokenStream.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public function freeze()
8383
/**
8484
* Returns next token.
8585
*
86-
* @throws InternalErrorException If there is no more token
87-
*
8886
* @return Token
87+
*
88+
* @throws InternalErrorException If there is no more token
8989
*/
9090
public function getNext()
9191
{
@@ -131,9 +131,9 @@ public function getUsed()
131131
/**
132132
* Returns nex identifier token.
133133
*
134-
* @throws SyntaxErrorException If next token is not an identifier
135-
*
136134
* @return string The identifier token value
135+
*
136+
* @throws SyntaxErrorException If next token is not an identifier
137137
*/
138138
public function getNextIdentifier()
139139
{
@@ -149,9 +149,9 @@ public function getNextIdentifier()
149149
/**
150150
* Returns nex identifier or star delimiter token.
151151
*
152-
* @throws SyntaxErrorException If next token is not an identifier or a star delimiter
153-
*
154152
* @return null|string The identifier token value or null if star found
153+
*
154+
* @throws SyntaxErrorException If next token is not an identifier or a star delimiter
155155
*/
156156
public function getNextIdentifierOrStar()
157157
{

src/Symfony/Component/CssSelector/XPath/Translator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ public function addPseudoClass(XPathExpr $xpath, $pseudoClass)
266266
* @param string $attribute
267267
* @param string $value
268268
*
269-
* @throws ExpressionErrorException
270-
*
271269
* @return XPathExpr
270+
*
271+
* @throws ExpressionErrorException
272272
*/
273273
public function addAttributeMatching(XPathExpr $xpath, $operator, $attribute, $value)
274274
{

src/Symfony/Component/EventDispatcher/GenericEvent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function getSubject()
6161
*
6262
* @param string $key Key.
6363
*
64-
* @throws \InvalidArgumentException If key is not found.
65-
*
6664
* @return mixed Contents of array key.
65+
*
66+
* @throws \InvalidArgumentException If key is not found.
6767
*/
6868
public function getArgument($key)
6969
{
@@ -130,9 +130,9 @@ public function hasArgument($key)
130130
*
131131
* @param string $key Array key.
132132
*
133-
* @throws \InvalidArgumentException If key does not exist in $this->args.
134-
*
135133
* @return mixed
134+
*
135+
* @throws \InvalidArgumentException If key does not exist in $this->args.
136136
*/
137137
public function offsetGet($key)
138138
{

src/Symfony/Component/Finder/Expression/Expression.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ public function isGlob()
123123
}
124124

125125
/**
126-
* @throws \LogicException
127-
*
128126
* @return Glob
127+
*
128+
* @throws \LogicException
129129
*/
130130
public function getGlob()
131131
{

src/Symfony/Component/Finder/Finder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ public function useBestAdapter()
128128
*
129129
* @param string $name
130130
*
131-
* @throws \InvalidArgumentException
132-
*
133131
* @return Finder The current Finder instance
132+
*
133+
* @throws \InvalidArgumentException
134134
*/
135135
public function setAdapter($name)
136136
{

src/Symfony/Component/Form/Form.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,9 +1072,9 @@ public function createView(FormView $parent = null)
10721072
*
10731073
* @param mixed $value The value to transform
10741074
*
1075-
* @throws TransformationFailedException If the value cannot be transformed to "normalized" format
1076-
*
10771075
* @return mixed
1076+
*
1077+
* @throws TransformationFailedException If the value cannot be transformed to "normalized" format
10781078
*/
10791079
private function modelToNorm($value)
10801080
{
@@ -1098,9 +1098,9 @@ private function modelToNorm($value)
10981098
*
10991099
* @param string $value The value to reverse transform
11001100
*
1101-
* @throws TransformationFailedException If the value cannot be transformed to "model" format
1102-
*
11031101
* @return mixed
1102+
*
1103+
* @throws TransformationFailedException If the value cannot be transformed to "model" format
11041104
*/
11051105
private function normToModel($value)
11061106
{
@@ -1126,9 +1126,9 @@ private function normToModel($value)
11261126
*
11271127
* @param mixed $value The value to transform
11281128
*
1129-
* @throws TransformationFailedException If the value cannot be transformed to "view" format
1130-
*
11311129
* @return mixed
1130+
*
1131+
* @throws TransformationFailedException If the value cannot be transformed to "view" format
11321132
*/
11331133
private function normToView($value)
11341134
{
@@ -1161,9 +1161,9 @@ private function normToView($value)
11611161
*
11621162
* @param string $value The value to reverse transform
11631163
*
1164-
* @throws TransformationFailedException If the value cannot be transformed to "normalized" format
1165-
*
11661164
* @return mixed
1165+
*
1166+
* @throws TransformationFailedException If the value cannot be transformed to "normalized" format
11671167
*/
11681168
private function viewToNorm($value)
11691169
{

0 commit comments

Comments
 (0)
0