-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OverridingPropertyRule - relax checking PHPDoc types
- Loading branch information
1 parent
9762d37
commit 24f6264
Showing
5 changed files
with
145 additions
and
7 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
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
31 changes: 31 additions & 0 deletions
31
tests/PHPStan/Rules/Properties/data/overriding-property-phpdoc.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,31 @@ | ||
<?php | ||
|
||
namespace OverridingPropertyPhpDoc; | ||
|
||
class Foo | ||
{ | ||
|
||
/** @var array */ | ||
protected $array; | ||
|
||
/** @var array<class-string> */ | ||
protected $arrayClassStrings; | ||
|
||
/** @var string */ | ||
protected $string; | ||
|
||
} | ||
|
||
class Bar extends Foo | ||
{ | ||
|
||
/** @var array<class-string> */ | ||
protected $array; | ||
|
||
/** @var array */ | ||
protected $arrayClassStrings; | ||
|
||
/** @var int */ | ||
protected $string; | ||
|
||
} |