Bug Report
| Subject |
Details |
| Rector version |
last dev-main |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/d999289f-45a0-4ea5-9bb4-d18d1ddefe75
<?php
namespace Rector\Tests\CodeQuality\Rector\Catch_\ThrowWithPreviousExceptionRector\Fixture;
class NamedArgumentForMessage
{
public function run()
{
try {
$this->run();
}catch(\Throwable $throwable) {
throw new LogicException(message: 'Some exception');
}
}
}
Expected Behaviour
Named arguments are used if message argument used named arguments, otherwise, PHP will complain about "Cannot use a positional argument after a named argument"