-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve fully qualified class sniff to check inheritance classes too
- Loading branch information
Michael Nozdrevatykh
committed
Oct 9, 2020
1 parent
6a5a156
commit 85863d6
Showing
4 changed files
with
31 additions
and
3 deletions.
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
13 changes: 13 additions & 0 deletions
13
tests/rules/classes/not-allowed/FullyQualifiedSniffExtends.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,13 @@ | ||
<?php | ||
|
||
// @expectedError Qualifier should be replaced with an import: "extends \stdClass" | ||
|
||
namespace flyeralarm\Test; | ||
|
||
class FullyQualifiedSniffExtends extends \stdClass | ||
{ | ||
public function a() | ||
{ | ||
$a = 0; | ||
} | ||
} |