Skip to content

Commit a0062f8

Browse files
Temporary use rector-src:dev-bump-phpstan-226 to fix compatibility phpstan 2.2.6 (#382)
* Temporary use rector-src:dev-bump-phpstan-226 to fix compatibility phpstan 2.2.6 * [rector] Rector fixes * fix test --------- Co-authored-by: GitHub Action <actions@github.com>
1 parent 9e40368 commit a0062f8

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"phpstan/phpstan-webmozart-assert": "^2.0",
1414
"phpunit/phpunit": "^11.5",
1515
"rector/jack": "^0.5.1",
16-
"rector/rector-src": "dev-main",
16+
"rector/rector-src": "dev-bump-phpstan-226",
1717
"rector/swiss-knife": "^2.3",
1818
"rector/type-perfect": "^2.1",
1919
"symplify/easy-coding-standard": "^13.0",

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|string|null
19+
* @return int|null|string
2020
*/
2121
public function run($value)
2222
{

src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@
4141
/**
4242
* @see https://wiki.php.net/rfc/internal_method_return_types#proposal
4343
*/
44-
final class PhpDocFromTypeDeclarationDecorator
44+
final readonly class PhpDocFromTypeDeclarationDecorator
4545
{
4646
/**
4747
* @var ClassMethodWillChangeReturnType[]
4848
*/
49-
private array $classMethodWillChangeReturnTypes = [];
49+
private array $classMethodWillChangeReturnTypes;
5050

5151
public function __construct(
52-
private readonly StaticTypeMapper $staticTypeMapper,
53-
private readonly PhpDocInfoFactory $phpDocInfoFactory,
54-
private readonly NodeNameResolver $nodeNameResolver,
55-
private readonly PhpDocTypeChanger $phpDocTypeChanger,
56-
private readonly PhpAttributeGroupFactory $phpAttributeGroupFactory,
57-
private readonly ReflectionResolver $reflectionResolver,
58-
private readonly PhpAttributeAnalyzer $phpAttributeAnalyzer,
59-
private readonly PhpVersionProvider $phpVersionProvider,
60-
private readonly AstResolver $astResolver
52+
private StaticTypeMapper $staticTypeMapper,
53+
private PhpDocInfoFactory $phpDocInfoFactory,
54+
private NodeNameResolver $nodeNameResolver,
55+
private PhpDocTypeChanger $phpDocTypeChanger,
56+
private PhpAttributeGroupFactory $phpAttributeGroupFactory,
57+
private ReflectionResolver $reflectionResolver,
58+
private PhpAttributeAnalyzer $phpAttributeAnalyzer,
59+
private PhpVersionProvider $phpVersionProvider,
60+
private AstResolver $astResolver
6161
) {
6262
$this->classMethodWillChangeReturnTypes = [
6363
// @todo how to make list complete? is the method list needed or can we use just class names?

0 commit comments

Comments
 (0)