Skip to content

Commit

Permalink
Modify rule S5899: Add exception on public static method that return …
Browse files Browse the repository at this point in the history
…data (#2897)
  • Loading branch information
rudy-regazzoni-sonarsource authored Sep 25, 2023
1 parent 180ec50 commit 62dc976
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/S5899/php/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The PHPUnit test runner does execute public methods defined within test classes that have a name starting with _"test"_ or the _@test_ annotation. Methods that do not convey to this will not get executed.


This rule raises an issue on methods marked as test methods (by name or annotation) but do not have a public visibility. An issue is also raised on public methods that are not marked as tests, do contain assertions, and are not called from within another discoverable test method within the class. No issues are raised in abstract classes.
This rule raises an issue on methods marked as test methods (by name or annotation) but do not have a public visibility. An issue is also raised on public methods that are not marked as tests, do contain assertions, and are not called from within another discoverable test method within the class. No issues are raised in abstract classes, or on public static method which provides data.


=== Noncompliant code example
Expand Down

0 comments on commit 62dc976

Please sign in to comment.