Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 3 additions & 43 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -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.