-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve ReturnTypeWillChangeRector to handle any method of defined ty…
…pe; move PhpDocFromTypeDeclarationDecorator to Downgrade rules (#2754)
- Loading branch information
1 parent
c0070b1
commit 2667f35
Showing
13 changed files
with
133 additions
and
296 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
223 changes: 0 additions & 223 deletions
223
packages/BetterPhpDocParser/PhpDocParser/PhpDocFromTypeDeclarationDecorator.php
This file was deleted.
Oops, something went wrong.
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
10 changes: 10 additions & 0 deletions
10
...rm/Rector/ClassMethod/ReturnTypeWillChangeRector/Fixture/skip_extra_public_method.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,10 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Transform\Rector\ClassMethod\ReturnTypeWillChangeRector\Fixture; | ||
|
||
final class SkipExtraPublicMethod extends \ArrayObject | ||
{ | ||
public function extraMethod() | ||
{ | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
...rm/Rector/ClassMethod/ReturnTypeWillChangeRector/Source/ClassThatWillChangeReturnType.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,11 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\Transform\Rector\ClassMethod\ReturnTypeWillChangeRector\Source; | ||
|
||
abstract class ClassThatWillChangeReturnType | ||
{ | ||
public function changeMyReturn() | ||
{ | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Php81\Enum; | ||
|
||
final class AttributeName | ||
{ | ||
/** | ||
* Available since PHP 8.1 | ||
* @see https://php.watch/versions/8.1/ReturnTypeWillChange | ||
* @var string | ||
*/ | ||
public const RETURN_TYPE_WILL_CHANGE = 'ReturnTypeWillChange'; | ||
} |
Oops, something went wrong.