Skip to content

Commit 6191592

Browse files
committed
minor #19898 Remove redundant parenthesis on attribute (alamirault)
This PR was merged into the 5.4 branch. Discussion ---------- Remove redundant parenthesis on attribute In symfony codebase `#[Foo]` is used instead of `#[Foo()]` Phpstorm like also without ![image](https://github.com/symfony/symfony-docs/assets/9253091/9a4902ef-4c6a-428d-9fae-7034aca17f19) I've made also PR for 6.4, if you're agree with this rule I will made other PR. (And maybe a new doctor-rst rule) Commits ------- 6453ce3 Remove redundant parenthesis on attribute
2 parents ba80985 + 6453ce3 commit 6191592

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

event_dispatcher.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ having to add any configuration in external files::
162162
}
163163
}
164164

165-
You can add multiple ``#[AsEventListener()]`` attributes to configure different methods::
165+
You can add multiple ``#[AsEventListener]`` attributes to configure different methods::
166166

167167
namespace App\EventListener;
168168

@@ -198,7 +198,7 @@ can also be applied to methods directly::
198198

199199
final class MyMultiListener
200200
{
201-
#[AsEventListener()]
201+
#[AsEventListener]
202202
public function onCustomEvent(CustomEvent $event): void
203203
{
204204
// ...

0 commit comments

Comments
 (0)