Skip to content

Commit

Permalink
Fix for: Violation of noParameterWithNullableTypeDeclaration rule ide…
Browse files Browse the repository at this point in the history
…ntifies itself as "ergebnis.noParameterWithContainerTypeDeclaration" in PHPStan output

- see #901
  • Loading branch information
manuelkiessling authored and localheinz committed Jan 16, 2025
1 parent decbdac commit 8538305
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

For a full diff see [`2.6.0...main`][2.6.0...main].

### Fixed

- Adjusted `Methods\NoParameterWithNullableTypeDeclarationRule` to use the appropriate error identifier ([#902]), by [@manuelkiessling]

## [`2.6.0`][2.6.0]

For a full diff see [`2.5.2...2.6.0`][2.5.2...2.6.0].
Expand Down Expand Up @@ -588,12 +592,14 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0].
[#891]: https://github.com/ergebnis/phpstan-rules/pull/891
[#895]: https://github.com/ergebnis/phpstan-rules/pull/895
[#897]: https://github.com/ergebnis/phpstan-rules/pull/897
[#902]: https://github.com/ergebnis/phpstan-rules/pull/902

[@cosmastech]: https://github.com/cosmastech
[@enumag]: https://github.com/enumag
[@ergebnis]: https://github.com/ergebnis
[@Great-Antique]: https://github.com/Great-Antique
[@localheinz]: https://github.com/localheinz
[@manuelkiessling]: https://github.com/manuelkiessling
[@nunomaduro]: https://github.com/nunomaduro
[@rpkamp]: https://github.com/rpkamp
[@Slamdunk]: https://github.com/Slamdunk
4 changes: 2 additions & 2 deletions src/Methods/NoParameterWithNullableTypeDeclarationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function processNode(
);

return Rules\RuleErrorBuilder::message($message)
->identifier(ErrorIdentifier::noParameterWithContainerTypeDeclaration()->toString())
->identifier(ErrorIdentifier::noParameterWithNullableTypeDeclaration()->toString())
->build();
}, $parametersWithNullableTypeDeclaration);
}
Expand All @@ -95,7 +95,7 @@ public function processNode(
);

return Rules\RuleErrorBuilder::message($message)
->identifier(ErrorIdentifier::noParameterWithContainerTypeDeclaration()->toString())
->identifier(ErrorIdentifier::noParameterWithNullableTypeDeclaration()->toString())
->build();
}, $parametersWithNullableTypeDeclaration);
}
Expand Down

0 comments on commit 8538305

Please sign in to comment.