Skip to content

Commit 417c7cc

Browse files
authored
Update fixtures for Type::toPhpDocNode() output (#421)
Union members are printed in PHPStan's canonical order, and an array value inside a generic type uses the T[] syntax. Needed for rectorphp/rector-src#8885. Amp-Thread-ID: https://ampcode.com/threads/T-01a179f2-995f-7745-8d8c-4c174ba5c0ce
1 parent 1c72ed5 commit 417c7cc

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎rules-tests/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector/Fixture/false_type.php.inc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Foo
1818
{
1919

2020
/**
21-
* @var \Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture\Foo|\Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture\Bar|false
21+
* @var \Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture\Bar|\Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture\Foo|false
2222
*/
2323
private $prop;
2424

‎rules-tests/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector/Fixture/function_union_too.php.inc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use PhpParser\Node\Name;
2020

2121
if (! function_exists('some_helper')) {
2222
/**
23-
* @param \PhpParser\Node\Name|mixed[] $item
23+
* @param mixed[]|\PhpParser\Node\Name $item
2424
*/
2525
function some_helper($item)
2626
{

‎rules-tests/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector/Fixture/keep_nullable_trio_docblock.php.inc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDecl
1616
final class NullableTrioDocblock
1717
{
1818
/**
19-
* @return int|null|string
19+
* @return int|string|null
2020
*/
2121
public function run($value)
2222
{

‎rules-tests/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector/Fixture/false_type.php.inc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Foo
1818
{
1919

2020
/**
21-
* @var \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture\Foo|\Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture\Bar|false
21+
* @var \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture\Bar|\Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture\Foo|false
2222
*/
2323
private $prop;
2424

‎rules-tests/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector/Fixture/union_true.php.inc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Rector\Tests\DowngradePhp82\Rector\Class_\DowngradeStandaloneNullTrueF
1919
final class UnionTrue
2020
{
2121
/**
22-
* @return null|true
22+
* @return true|null
2323
*/
2424
public function run(): null|bool
2525
{

0 commit comments

Comments
 (0)