Skip to content

Commit

Permalink
Remove MethodCallToMethodCallRector as unused (#4128)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jun 8, 2023
1 parent 2c13033 commit 059783f
Show file tree
Hide file tree
Showing 28 changed files with 51 additions and 867 deletions.
49 changes: 2 additions & 47 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 373 Rules Overview
# 372 Rules Overview

<br>

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

- [Strict](#strict) (5)

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

- [TypeDeclaration](#typedeclaration) (40)

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

<br>

### MethodCallToMethodCallRector

Change method one method from one service to a method call to in another service

:wrench: **configure it!**

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

```php
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Transform\Rector\MethodCall\MethodCallToMethodCallRector;
use Rector\Transform\ValueObject\MethodCallToMethodCall;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(MethodCallToMethodCallRector::class, [
new MethodCallToMethodCall('FirstDependency', 'go', 'SecondDependency', 'away'),
]);
};
```


```diff
class SomeClass
{
public function __construct(
- private FirstDependency $firstDependency
+ private SecondDependency $secondDependency
) {
}

public function run()
{
- $this->firstDependency->go();
+ $this->secondDependency->away();
}
}
```

<br>

### MethodCallToPropertyFetchRector

Turns method call `"$this->something()"` to property fetch "$this->something"
Expand Down
10 changes: 0 additions & 10 deletions easy-ci.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@
use PHPStan\PhpDocParser\Parser\TypeParser;
use Rector\BetterPhpDocParser\Contract\PhpDocParser\PhpDocNodeDecoratorInterface;
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
use Rector\CodeQuality\NodeTypeGroup;
use Rector\CodingStyle\Contract\ClassNameImport\ClassNameImportSkipVoterInterface;
use Rector\Core\Contract\Console\OutputStyleInterface;
use Rector\Core\Contract\PhpParser\Node\StmtsAwareInterface;
use Rector\Core\Contract\PHPStan\Reflection\TypeToCallReflectionResolver\TypeToCallReflectionResolverInterface;
use Rector\Core\Contract\Processor\FileProcessorInterface;
use Rector\Core\Contract\Rector\RectorInterface;
use Rector\Core\NodeManipulator\MethodCallManipulator;
use Rector\DependencyInjection\NodeManipulator\PropertyConstructorInjectionManipulator;
use Rector\FileSystemRector\Parser\FileInfoParser;
use Rector\Naming\Contract\AssignVariableNameResolverInterface;
use Rector\Naming\Contract\Guard\ConflictingNameGuardInterface;
use Rector\NodeNameResolver\Contract\NodeNameResolverInterface;
use Rector\NodeTypeResolver\Contract\NodeTypeResolverInterface;
use Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory;
use Rector\NodeTypeResolver\PHPStan\Scope\Contract\NodeVisitor\ScopeResolverNodeVisitorInterface;
use Rector\NodeTypeResolver\Reflection\BetterReflection\RectorBetterReflectionSourceLocatorFactory;
use Rector\Php80\Contract\AttributeDecoratorInterface;
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
use Rector\PhpDocParser\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface;
use Rector\ReadWrite\Contract\ParentNodeReadAnalyzerInterface;
Expand Down Expand Up @@ -56,23 +51,18 @@
NodeTypeResolverInterface::class,
ReadNodeAnalyzerInterface::class,
SetListInterface::class,
ConflictingNameGuardInterface::class,
TypeParser::class,
RectorBetterReflectionSourceLocatorFactory::class,
AbstractTestCase::class,
PHPStanServicesFactory::class,
OutputStyleInterface::class,
MethodCallManipulator::class,
AssignVariableNameResolverInterface::class,
// fix later - rector-symfony
PropertyConstructorInjectionManipulator::class,
// used in tests
FileInfoParser::class,
AnnotationToAttributeMapperInterface::class,
TypeWithClassTypeSpecifierInterface::class,
ParentNodeReadAnalyzerInterface::class,
StmtsAwareInterface::class,
NodeTypeGroup::class,

ScopeResolverNodeVisitorInterface::class,
]);
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 059783f

Please sign in to comment.