Skip to content

Commit

Permalink
[Transform] Remove MethodCallToAnotherMethodCallWithArgumentsRector a…
Browse files Browse the repository at this point in the history
…s unused (#3777)
  • Loading branch information
TomasVotruba committed May 8, 2023
1 parent d9e17ca commit cb30fd9
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 266 deletions.
40 changes: 2 additions & 38 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 417 Rules Overview
# 415 Rules Overview

<br>

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

- [Strict](#strict) (6)

- [Transform](#transform) (33)
- [Transform](#transform) (31)

- [TypeDeclaration](#typedeclaration) (40)

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

<br>

### MethodCallToAnotherMethodCallWithArgumentsRector

Turns old method call with specific types to new one with arguments

:wrench: **configure it!**

- class: [`Rector\Transform\Rector\MethodCall\MethodCallToAnotherMethodCallWithArgumentsRector`](../rules/Transform/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php)

```php
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Transform\Rector\MethodCall\MethodCallToAnotherMethodCallWithArgumentsRector;
use Rector\Transform\ValueObject\MethodCallToAnotherMethodCallWithArguments;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(MethodCallToAnotherMethodCallWithArgumentsRector::class, [
new MethodCallToAnotherMethodCallWithArguments('Nette\DI\ServiceDefinition', 'setInject', 'addTag', [
'inject',
]),
]);
};
```


```diff
$serviceDefinition = new Nette\DI\ServiceDefinition;
-$serviceDefinition->setInject();
+$serviceDefinition->addTag('inject');
```

<br>

### MethodCallToFuncCallRector

Change method call to function call
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.

0 comments on commit cb30fd9

Please sign in to comment.