-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #895 from ergebnis/fix/annotation
Fix: Do not require methods with `phpunit/phpunit` annotations to be `private`
- Loading branch information
Showing
5 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
.../Methods/PrivateInFinalClassRule/FinalClassWithProtectedMethodsWithPhpUnitAnnotations.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\PrivateInFinalClassRule; | ||
|
||
use PHPUnit\Framework; | ||
|
||
final class FinalClassWithProtectedMethodsWithPhpUnitAnnotations extends Framework\TestCase | ||
{ | ||
/** | ||
* @after | ||
*/ | ||
protected function methodWithAfterAnnotation(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @before | ||
*/ | ||
protected function methodWithBeforeAnnotation(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @preCondition | ||
*/ | ||
protected function methodWithPreConditionAnnotation(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @postCondition | ||
*/ | ||
protected function methodWithPostConditionAnnotation(): void | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters