Skip to content

Commit

Permalink
Remove UnsetAndIssetToMethodCallRector as unused (#4123)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jun 8, 2023
1 parent f2509fa commit 2c13033
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 283 deletions.
40 changes: 2 additions & 38 deletions build/target-repository/docs/rector_rules_overview.md
@@ -1,4 +1,4 @@
# 374 Rules Overview
# 373 Rules Overview

<br>

Expand Down Expand Up @@ -56,7 +56,7 @@

- [Strict](#strict) (5)

- [Transform](#transform) (25)
- [Transform](#transform) (24)

- [TypeDeclaration](#typedeclaration) (40)

Expand Down Expand Up @@ -7679,42 +7679,6 @@ return static function (RectorConfig $rectorConfig): void {

<br>

### UnsetAndIssetToMethodCallRector

Turns defined `__isset`/`__unset` calls to specific method calls.

:wrench: **configure it!**

- class: [`Rector\Transform\Rector\Isset_\UnsetAndIssetToMethodCallRector`](../rules/Transform/Rector/Isset_/UnsetAndIssetToMethodCallRector.php)

```php
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Transform\Rector\Isset_\UnsetAndIssetToMethodCallRector;
use Rector\Transform\ValueObject\UnsetAndIssetToMethodCall;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(UnsetAndIssetToMethodCallRector::class, [
new UnsetAndIssetToMethodCall('SomeContainer', 'hasService', 'removeService'),
]);
};
```


```diff
$container = new SomeContainer;
-isset($container["someKey"]);
-unset($container["someKey"]);
+$container->hasService("someKey");
+$container->removeService("someKey");
```

<br>

### WrapReturnRector

Wrap return value of specific method
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

124 changes: 0 additions & 124 deletions rules/Transform/Rector/Isset_/UnsetAndIssetToMethodCallRector.php

This file was deleted.

36 changes: 0 additions & 36 deletions rules/Transform/ValueObject/UnsetAndIssetToMethodCall.php

This file was deleted.

0 comments on commit 2c13033

Please sign in to comment.