Skip to content

Commit

Permalink
static fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 4, 2022
1 parent 3dea2bd commit 58069c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ parameters:
message: '#Method call return value that should be used, but is not#'
paths:
- src/Console/Output/RectorOutputStyle.php
- rules/Compatibility/NodeFactory/ConstructorClassMethodFactory.php
- src/Application/ChangedNodeScopeRefresher.php
- rules/TypeDeclaration/TypeNormalizer.php
- rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictNewArrayRector.php
Expand Down
4 changes: 2 additions & 2 deletions rules/Php80/Rector/FunctionLike/MixedTypeRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public function refactor(Node $node): ?Node
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);

$this->refactorParamTypes($node, $phpDocInfo);
$this->paramTagRemover->removeParamTagsIfUseless($phpDocInfo, $node);
$hasChanged = $this->paramTagRemover->removeParamTagsIfUseless($phpDocInfo, $node);

if (! $this->hasChanged) {
if (! $this->hasChanged && ! $hasChanged) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions rules/Php80/Rector/FunctionLike/UnionTypesRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public function refactor(Node $node): ?Node
$this->refactorParamTypes($node, $phpDocInfo);
$this->refactorReturnType($node, $phpDocInfo);

$this->paramTagRemover->removeParamTagsIfUseless($phpDocInfo, $node);
if ($phpDocInfo->hasChanged()) {
$hasChanged = $this->paramTagRemover->removeParamTagsIfUseless($phpDocInfo, $node);
if ($hasChanged) {
$this->hasChanged = true;
}

Expand Down

0 comments on commit 58069c3

Please sign in to comment.