Closed julienfastre closed 5 months ago
The signature of Symfony\Contracts\Translation\TranslatorInterface::trans is
Symfony\Contracts\Translation\TranslatorInterface::trans
interface TranslatorInterface { // ... public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string; // ... }
But the configured rules does not add the ? before the ?string $domain = null:
?
?string $domain = null
---------- begin diff ---------- @@ @@ public function getFilter() { $translator = new class () implements TranslatorInterface { - public function trans(string $id, array $parameters = [], ?string $domain = null, string $locale = null) + public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null) { return $id; } ----------- end diff ----------- Applied rules: * AddParamTypeDeclarationRector
As it is syntactically correct to remove this ?, it leads to conflicts between rector rules and other tools, like php-cs-fixer.
Can I suggest a PR to add this question mark ?
As the PR is quite straightforward, I submitted it.
The signature of
Symfony\Contracts\Translation\TranslatorInterface::trans
isBut the configured rules does not add the
?
before the?string $domain = null
:As it is syntactically correct to remove this
?
, it leads to conflicts between rector rules and other tools, like php-cs-fixer.Can I suggest a PR to add this question mark ?