Skip to content

Commit

Permalink
[TypeDeclaration] Remove CompleteVarDocTypePropertyRector, is handled…
Browse files Browse the repository at this point in the history
… by split rules (#1500)
  • Loading branch information
TomasVotruba authored Dec 15, 2021
1 parent bfe8d99 commit 3417ff4
Show file tree
Hide file tree
Showing 29 changed files with 21 additions and 1,002 deletions.
44 changes: 21 additions & 23 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11693,29 +11693,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {

<br>

### CompleteVarDocTypePropertyRector

Complete property `@var` annotations or correct the old ones

- class: [`Rector\TypeDeclaration\Rector\Property\CompleteVarDocTypePropertyRector`](../rules/TypeDeclaration/Rector/Property/CompleteVarDocTypePropertyRector.php)

```diff
final class SomeClass
{
+ /**
+ * @var EventDispatcher
+ */
private $eventDispatcher;

public function __construct(EventDispatcher $eventDispatcher)
{
$this->eventDispatcher = $eventDispatcher;
}
}
```

<br>

### FormerNullableArgumentToScalarTypedRector

Change null in argument, that is now not nullable anymore
Expand Down Expand Up @@ -11984,6 +11961,27 @@ Add return method return type based on strict typed property

<br>

### TypedPropertyFromAssignsRector

Add typed property from assigned types

- class: [`Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector`](../rules/TypeDeclaration/Rector/Property/TypedPropertyFromAssignsRector.php)

```diff
final class SomeClass
{
- private $name;
+ private string|null $name = null;

public function run()
{
$this->name = 'string';
}
}
```

<br>

### TypedPropertyFromStrictConstructorRector

Add typed properties based only on strict constructor types
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
"stubs/Doctrine/Common/Persistence/ObjectManager.php",
"rules-tests/Transform/Rector/FuncCall/FuncCallToMethodCallRector/Source/some_view_function.php",
"rules-tests/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector/Source/MyBar.php",
"rules-tests/TypeDeclaration/Rector/Property/CompleteVarDocTypePropertyRector/Source/EventDispatcher.php",
"rules-tests/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector/Source/FunctionTyped.php"
]
},
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3417ff4

Please sign in to comment.