rector-src icon indicating copy to clipboard operation
rector-src copied to clipboard

Development repository for Rector

Results 33 rector-src issues
Sort by recently updated
recently updated
newest added

# Changes - Adds a new rule for type hinting closures used with `array_map`. - Adds tests. # Why Another rule from me which will deal with the difficulties of...

If you are running Rector in CI or if you have several machines available to run it and you have a large code base, you may want to split processing...

# Changes * Adds a new `CallLikeExpectsThisBindedClosureArgsAnalyzer` which allows the detection of the `@param-closure-this`. * Adds a mechanism in the Static Closure rule to apply an attribute to closures that...

It seems the `leaveNode` seems no longer needed on both `AbstractRector` and `CallableNodeVisitor`, also its save nodes to returns and node id to remove properties. This PR to remove it...

Per PHPStan PR: - https://github.com/phpstan/phpstan-src/pull/4651

- **[experiment] skip beforeTraverse() and afterTraverse() as never used** - **wip**

Removes ifs, elseifs, and elses with no body. Combines them with others when appropriate. ```diff class RemoveDeadIfBlock { public function run($condition) { - if ($value) { - } elseif ($differentValue)...

This PR removed the dead code from magic methods.

The `ArgumentAdderRector`, `ReplaceArgumentDefaultValueRector`, `FunctionArgumentDefaultValueReplacerRector` and `RemoveMethodCallParamRector` rules add, modify or remove parameters using the position of the parameter. This can be problematic if the function/method call uses named arguments as...