-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PHPStanStaticTypeMapper] FQCN for Closure type mapper (#4584)
* [PHPStanStaticTypeMapper] FQCN for Closure type mapper * [PHPStanStaticTypeMapper] FQCN for Closure type mapper * Fix * [ci-review] Rector Rectify * [ci-review] Rector Rectify * remove replace * add auto import test * revert auto import test * skip already nullable closure var * [ci-review] Rector Rectify * rename fxture * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
079cd51
commit 578d637
Showing
5 changed files
with
56 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
23 changes: 23 additions & 0 deletions
23
...ationIncorrectNullableRector/Fixture/fqcn_var_closure_var_annotation_missing_null.php.inc
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,23 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector\Fixture; | ||
|
||
final class FqcnVarClosureVarAnnotationMissingNull | ||
{ | ||
/** @var \Closure(string, int, \Closure(float):int):string */ | ||
private ?\Closure $tooltipGenerator = null; | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector\Fixture; | ||
|
||
final class FqcnVarClosureVarAnnotationMissingNull | ||
{ | ||
/** @var null|\Closure(string, int, \Closure(float): int): string */ | ||
private ?\Closure $tooltipGenerator = null; | ||
} | ||
|
||
?> |
11 changes: 11 additions & 0 deletions
11
...ty/VarAnnotationIncorrectNullableRector/Fixture/skip_already_nullable_closure_var.php.inc
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,11 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector\Fixture; | ||
|
||
use Closure; | ||
|
||
final class SkipAlreadyNullableClosureVar | ||
{ | ||
/** @var null|Closure(string, int, Closure(float):int):string */ | ||
private ?Closure $tooltipGenerator = null; | ||
} |
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