Skip to content

Commit

Permalink
Remove NewArgToMethodCallRector as unused (#4130)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jun 8, 2023
1 parent 8268750 commit 2d13bc9
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 281 deletions.
46 changes: 3 additions & 43 deletions build/target-repository/docs/rector_rules_overview.md
@@ -1,4 +1,4 @@
# 372 Rules Overview
# 371 Rules Overview

<br>

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

- [Strict](#strict) (5)

- [Transform](#transform) (23)
- [Transform](#transform) (22)

- [TypeDeclaration](#typedeclaration) (40)

Expand Down Expand Up @@ -950,7 +950,7 @@ Change unsafe new `static()` to new `self()`
- class: [`Rector\CodeQuality\Rector\New_\NewStaticToNewSelfRector`](../rules/CodeQuality/Rector/New_/NewStaticToNewSelfRector.php)

```diff
class SomeClass
final class SomeClass
{
public function build()
{
Expand Down Expand Up @@ -7201,46 +7201,6 @@ return static function (RectorConfig $rectorConfig): void {

<br>

### NewArgToMethodCallRector

Change new with specific argument to method call

:wrench: **configure it!**

- class: [`Rector\Transform\Rector\New_\NewArgToMethodCallRector`](../rules/Transform/Rector/New_/NewArgToMethodCallRector.php)

```php
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Transform\Rector\New_\NewArgToMethodCallRector;
use Rector\Transform\ValueObject\NewArgToMethodCall;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(NewArgToMethodCallRector::class, [
new NewArgToMethodCall('Dotenv', true, 'usePutenv'),
]);
};
```


```diff
class SomeClass
{
public function run()
{
- $dotenv = new Dotenv(true);
+ $dotenv = new Dotenv();
+ $dotenv->usePutenv();
}
}
```

<br>

### NewToStaticCallRector

Change new Object to static call
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

112 changes: 0 additions & 112 deletions rules/Transform/Rector/New_/NewArgToMethodCallRector.php

This file was deleted.

38 changes: 0 additions & 38 deletions rules/Transform/ValueObject/NewArgToMethodCall.php

This file was deleted.

0 comments on commit 2d13bc9

Please sign in to comment.