mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
[YamlRector] Apply array param autowire
This commit is contained in:
parent
318f5b30f8
commit
ca574d7cab
@ -12,9 +12,12 @@ final class YamlFileProcessor
|
||||
*/
|
||||
private $yamlRectors = [];
|
||||
|
||||
public function addYamlRector(YamlRectorInterface $yamlRector): void
|
||||
/**
|
||||
* @param YamlRectorInterface[] $yamlRectors
|
||||
*/
|
||||
public function __construct(array $yamlRectors = [])
|
||||
{
|
||||
$this->yamlRectors[] = $yamlRector;
|
||||
$this->yamlRectors = $yamlRectors;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,9 +1,2 @@
|
||||
imports:
|
||||
- { resource: 'services.yml' }
|
||||
|
||||
parameters:
|
||||
collectors:
|
||||
-
|
||||
main_type: 'Rector\YamlRector\YamlFileProcessor'
|
||||
collected_type: 'Rector\YamlRector\Contract\YamlRectorInterface'
|
||||
add_method: 'addYamlRector'
|
||||
|
Loading…
x
Reference in New Issue
Block a user