Modify rule S5899: Add exception on public static method that return data (#2897)

This commit is contained in:
Rudy Regazzoni 2023-09-25 12:53:02 +02:00 committed by GitHub
parent 180ec50cb2
commit 62dc9768f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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