Skip to content

Commit b3427d3

Browse files
committed
updat phpdoc
1 parent 0f1b77a commit b3427d3

File tree

6 files changed

+32
-10
lines changed

6 files changed

+32
-10
lines changed

src/Rules/Classes/DisallowClassesRule.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use PHPStan\Analyser\Scope;
88
use PHPStan\Rules\Rule;
99
use PHPStan\Rules\RuleErrorBuilder;
10+
use PHPStan\Rules\IdentifierRuleError;
1011

1112
class DisallowClassesRule implements Rule
1213
{
@@ -23,9 +24,9 @@ public function getNodeType(): string
2324
}
2425

2526
/**
26-
* @param \PhpParser\Node\Stmt\Class_ $node
27-
* @param \PHPStan\Analyser\Scope $scope
28-
* @return \PHPStan\Rules\IdentifierRuleError[]
27+
* @param Class_ $node
28+
* @param Scope $scope
29+
* @return IdentifierRuleError[]
2930
*/
3031
public function processNode(Node $node, Scope $scope): array
3132
{

src/Rules/Exceptions/DisallowThrowRule.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use PHPStan\Analyser\Scope;
88
use PHPStan\Rules\Rule;
99
use PHPStan\Rules\RuleErrorBuilder;
10+
use PHPStan\Rules\IdentifierRuleError;
1011

1112
class DisallowThrowRule implements Rule
1213
{
@@ -22,6 +23,11 @@ public function getNodeType(): string
2223
return Throw_::class;
2324
}
2425

26+
/**
27+
* @param Throw_ $node
28+
* @param Scope $scope
29+
* @return IdentifierRuleError[]
30+
*/
2531
public function processNode(Node $node, Scope $scope): array
2632
{
2733
if (!$this->disallowThrow) {
@@ -31,7 +37,9 @@ public function processNode(Node $node, Scope $scope): array
3137
$errorMessage = 'Should not use throw';
3238

3339
return [
34-
RuleErrorBuilder::message($errorMessage)->identifier('PHPStanFp.disallowThrow')->build()
40+
RuleErrorBuilder::message($errorMessage)
41+
->identifier('PHPStanFp.disallowThrow')
42+
->build()
3543
];
3644
}
3745
}

src/Rules/Expression/DisallowUnusedExpressionRule.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use PHPStan\Analyser\Scope;
88
use PHPStan\Rules\Rule;
99
use PHPStan\Rules\RuleErrorBuilder;
10+
use PHPStan\Rules\IdentifierRuleError;
1011

1112
class DisallowUnusedExpressionRule implements Rule
1213
{
@@ -23,9 +24,9 @@ public function getNodeType(): string
2324
}
2425

2526
/**
26-
* @param \PhpParser\Node\Stmt\Expression $node
27-
* @param \PHPStan\Analyser\Scope $scope
28-
* @return \PHPStan\Rules\IdentifierRuleError[]
27+
* @param Expression $node
28+
* @param Scope $scope
29+
* @return IdentifierRuleError[]
2930
*/
3031
public function processNode(Node $node, Scope $scope): array
3132
{

src/Rules/Functions/DisallowMutatingFunctionsRule.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use PHPStan\Analyser\Scope;
88
use PHPStan\Rules\Rule;
99
use PHPStan\Rules\RuleErrorBuilder;
10+
use PHPStan\Rules\IdentifierRuleError;
1011

1112
class DisallowMutatingFunctionsRule implements Rule
1213
{
@@ -47,9 +48,9 @@ public function getNodeType(): string
4748
}
4849

4950
/**
50-
* @param \PhpParser\Node\Expr\FuncCall $node
51-
* @param \PHPStan\Analyser\Scope $scope
52-
* @return \PHPStan\Rules\IdentifierRuleError[]
51+
* @param FuncCall $node
52+
* @param Scope $scope
53+
* @return IdentifierRuleError[]
5354
*/
5455
public function processNode(Node $node, Scope $scope): array
5556
{

src/Rules/Loops/DisallowLoopsRule.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Rules\Rule;
88
use PHPStan\Rules\RuleErrorBuilder;
9+
use PHPStan\Rules\IdentifierRuleError;
910

1011
abstract class DisallowLoopsRule implements Rule
1112
{
@@ -16,6 +17,11 @@ public function __construct(bool $disallowLoops)
1617
$this->disallowLoops = $disallowLoops;
1718
}
1819

20+
/**
21+
* @param Node $node
22+
* @param Scope $scope
23+
* @return IdentifierRuleError[]
24+
*/
1925
public function processNode(Node $node, Scope $scope): array
2026
{
2127
if (!$this->disallowLoops) {

src/Rules/Variables/DisallowMutationRule.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ public function __construct(bool $disallowVariablesMutation)
1717
$this->disallowVariablesMutation = $disallowVariablesMutation;
1818
}
1919

20+
/**
21+
* @param Node $node
22+
* @param Scope $scope
23+
* @return IdentifierRuleError[]
24+
*/
2025
public function processNode(Node $node, Scope $scope): array
2126
{
2227
if (!$this->disallowVariablesMutation) {

0 commit comments

Comments
 (0)