Run Rector on your code to see what it can do for you:
public function addMediaFolder(
string $name,
string $description = null,
- string $mediaType = '',
+ string $mediaType = 'PNG',
string $color = '',
) {
}
public function run(MediaManager $manager)
{
// this one is correctly handled
- $manager->addMediaFolder($folderName, '', '', '');
+ $manager->addMediaFolder($folderName, '', 'PNG', '');
// this one is not, the wrong parameter is changed and
// we end up with a positional parameter after a named parameter
- $manager->addMediaFolder($folderName, mediaType: '', color:'');
+ $manager->addMediaFolder($folderName, mediaType: '', 'PNG');
}
}