Skip to content

Commit 925a21f

Browse files
committed
celan up
1 parent 8c92086 commit 925a21f

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

config/sets/symfony/symfony6/symfony60/symfony60-console.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
use PHPStan\Type\ArrayType;
66
use PHPStan\Type\BooleanType;
7-
use PHPStan\Type\FloatType;
87
use PHPStan\Type\IntegerType;
9-
use PHPStan\Type\IterableType;
108
use PHPStan\Type\MixedType;
119
use PHPStan\Type\NullType;
1210
use PHPStan\Type\ObjectType;
@@ -15,7 +13,6 @@
1513
use Rector\Config\RectorConfig;
1614
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
1715
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
18-
use Rector\Util\Reflection\PrivatesAccessor;
1916

2017
// https://github.com/symfony/symfony/blob/6.1/UPGRADE-6.0.md
2118
// @see https://github.com/symfony/symfony/blob/6.1/.github/expected-missing-return-types.diff
@@ -24,25 +21,6 @@
2421
$arrayType = new ArrayType(new MixedType(), new MixedType());
2522
$commandType = new ObjectType('Symfony\Component\Console\Command\Command');
2623

27-
$scalarTypes = [
28-
$arrayType,
29-
new BooleanType(),
30-
new StringType(),
31-
new IntegerType(),
32-
new FloatType(),
33-
new NullType(),
34-
];
35-
36-
$scalarArrayObjectUnionedTypes = [...$scalarTypes, new ObjectType('ArrayObject')];
37-
38-
// cannot be crated with \PHPStan\Type\UnionTypeHelper::sortTypes() as ObjectType requires a class reflection we do not have here
39-
$unionTypeReflectionClass = new ReflectionClass(UnionType::class);
40-
41-
/** @var UnionType $scalarArrayObjectUnionType */
42-
$scalarArrayObjectUnionType = $unionTypeReflectionClass->newInstanceWithoutConstructor();
43-
44-
$privatesAccessor = new PrivatesAccessor();
45-
$privatesAccessor->setPrivateProperty($scalarArrayObjectUnionType, 'types', $scalarArrayObjectUnionedTypes);
4624
$rectorConfig->ruleWithConfiguration(AddReturnTypeDeclarationRector::class, [
4725
// @see https://github.com/symfony/symfony/pull/43028/files
4826
new AddReturnTypeDeclaration(

config/sets/symfony/symfony6/symfony60/symfony60-security-http.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@
33
declare(strict_types=1);
44

55
use PHPStan\Type\ArrayType;
6-
use PHPStan\Type\BooleanType;
7-
use PHPStan\Type\FloatType;
8-
use PHPStan\Type\IntegerType;
96
use PHPStan\Type\MixedType;
10-
use PHPStan\Type\NullType;
117
use PHPStan\Type\ObjectType;
12-
use PHPStan\Type\StringType;
13-
use PHPStan\Type\UnionType;
148
use Rector\Config\RectorConfig;
159
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
1610
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
17-
use Rector\Util\Reflection\PrivatesAccessor;
1811

1912
// https://github.com/symfony/symfony/blob/6.1/UPGRADE-6.0.md
2013
// @see https://github.com/symfony/symfony/blob/6.1/.github/expected-missing-return-types.diff
@@ -23,25 +16,6 @@
2316
$arrayType = new ArrayType(new MixedType(), new MixedType());
2417
$httpFoundationResponseType = new ObjectType('Symfony\Component\HttpFoundation\Response');
2518

26-
$scalarTypes = [
27-
$arrayType,
28-
new BooleanType(),
29-
new StringType(),
30-
new IntegerType(),
31-
new FloatType(),
32-
new NullType(),
33-
];
34-
35-
$scalarArrayObjectUnionedTypes = [...$scalarTypes, new ObjectType('ArrayObject')];
36-
37-
// cannot be crated with \PHPStan\Type\UnionTypeHelper::sortTypes() as ObjectType requires a class reflection we do not have here
38-
$unionTypeReflectionClass = new ReflectionClass(UnionType::class);
39-
40-
/** @var UnionType $scalarArrayObjectUnionType */
41-
$scalarArrayObjectUnionType = $unionTypeReflectionClass->newInstanceWithoutConstructor();
42-
43-
$privatesAccessor = new PrivatesAccessor();
44-
$privatesAccessor->setPrivateProperty($scalarArrayObjectUnionType, 'types', $scalarArrayObjectUnionedTypes);
4519
$rectorConfig->ruleWithConfiguration(AddReturnTypeDeclarationRector::class, [
4620
new AddReturnTypeDeclaration(
4721
'Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface',

0 commit comments

Comments
 (0)