mirror of https://github.com/rectorphp/rector.git
docs link to the top to find quickly
This commit is contained in:
parent
42c5141d70
commit
e564834329
|
@ -7,6 +7,8 @@ Why refactor manually if Rector can handle 80% for you?
|
|||
[![Downloads](https://img.shields.io/packagist/dt/rector/rector.svg?style=flat-square)](https://packagist.org/packages/rector/rector)
|
||||
[![SonarCube](https://img.shields.io/badge/SonarCube_Debt-%3C25-brightgreen.svg?style=flat-square)](https://sonarcloud.io/dashboard?id=rectorphp_rector)
|
||||
|
||||
- **[All 450+ Rectors Overview](/docs/AllRectorsOverview.md)
|
||||
|
||||
![Rector-showcase](docs/images/rector-showcase-var.gif)
|
||||
|
||||
<br>
|
||||
|
|
|
@ -8,7 +8,7 @@ use PhpParser\Node;
|
|||
use PhpParser\Node\Expr\FuncCall;
|
||||
use Rector\Core\Exception\Configuration\InvalidConfigurationException;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\RectorDefinition\CodeSample;
|
||||
use Rector\Core\RectorDefinition\ConfiguredCodeSample;
|
||||
use Rector\Core\RectorDefinition\RectorDefinition;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ final class RenameFuncCallToStaticCallRector extends AbstractRector
|
|||
public function getDefinition(): RectorDefinition
|
||||
{
|
||||
return new RectorDefinition('Rename func call to static call', [
|
||||
new CodeSample(
|
||||
new ConfiguredCodeSample(
|
||||
<<<'PHP'
|
||||
class SomeClass
|
||||
{
|
||||
|
@ -46,12 +46,16 @@ class SomeClass
|
|||
{
|
||||
public function run()
|
||||
{
|
||||
\Strings::strPee('...');
|
||||
\Strings::strPaa('...');
|
||||
}
|
||||
}
|
||||
PHP
|
||||
|
||||
),
|
||||
, [
|
||||
'$functionsToStaticCalls' => [
|
||||
'strPee' => ['Strings', 'strPaa'],
|
||||
],
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue