|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +use Rector\Arguments\Rector\ClassMethod\ReplaceArgumentDefaultValueRector; |
| 6 | +use Rector\Arguments\ValueObject\ReplaceArgumentDefaultValue; |
| 7 | +use Rector\Config\RectorConfig; |
| 8 | + |
| 9 | +return static function (RectorConfig $rectorConfig): void { |
| 10 | + $rectorConfig->ruleWithConfiguration(ReplaceArgumentDefaultValueRector::class, [ |
| 11 | + new ReplaceArgumentDefaultValue('Symfony\Component\Yaml\Yaml', 'parse', 1, [ |
| 12 | + false, |
| 13 | + false, |
| 14 | + true, |
| 15 | + ], 'Symfony\Component\Yaml\Yaml::PARSE_OBJECT_FOR_MAP'), |
| 16 | + new ReplaceArgumentDefaultValue('Symfony\Component\Yaml\Yaml', 'parse', 1, [ |
| 17 | + false, |
| 18 | + true, |
| 19 | + ], 'Symfony\Component\Yaml\Yaml::PARSE_OBJECT'), |
| 20 | + new ReplaceArgumentDefaultValue( |
| 21 | + 'Symfony\Component\Yaml\Yaml', |
| 22 | + 'parse', |
| 23 | + 1, |
| 24 | + true, |
| 25 | + 'Symfony\Component\Yaml\Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE' |
| 26 | + ), |
| 27 | + new ReplaceArgumentDefaultValue('Symfony\Component\Yaml\Yaml', 'parse', 1, false, 0), |
| 28 | + new ReplaceArgumentDefaultValue( |
| 29 | + 'Symfony\Component\Yaml\Yaml', |
| 30 | + 'dump', |
| 31 | + 3, |
| 32 | + [false, true], |
| 33 | + 'Symfony\Component\Yaml\Yaml::DUMP_OBJECT' |
| 34 | + ), |
| 35 | + new ReplaceArgumentDefaultValue( |
| 36 | + 'Symfony\Component\Yaml\Yaml', |
| 37 | + 'dump', |
| 38 | + 3, |
| 39 | + true, |
| 40 | + 'Symfony\Component\Yaml\Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE' |
| 41 | + ), |
| 42 | + ]); |
| 43 | +}; |
0 commit comments