mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
[Symfony] init AddAutowireRector
This commit is contained in:
parent
872b5bc7f5
commit
a34627c56c
@ -0,0 +1,25 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\YamlParser\Rector\Contrib\Symfony;
|
||||
|
||||
use Rector\YamlParser\Contract\Rector\YamlRectorInterface;
|
||||
|
||||
final class AddAutowireRector implements YamlRectorInterface
|
||||
{
|
||||
public function getCandidateKey(): string
|
||||
{
|
||||
return 'services';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $data
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function refactor(array $services): array
|
||||
{
|
||||
// add autowire if required or missing
|
||||
// remove explicit arguments @...
|
||||
|
||||
return $services;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
//
|
||||
|
||||
final class AddAutowireRectorTest
|
||||
{
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user