File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1188,7 +1188,7 @@ $foo->bar(
1188
1188
Short closures, also known as arrow functions, MUST follow the same guidelines
1189
1189
and principles as long closures above, with the following additions.
1190
1190
1191
- The ` fn ` keyword MUST be preceded and succeeded by a space.
1191
+ The ` fn ` keyword MUST be preceded by a space, and MUST NOT be succeeded by a space.
1192
1192
1193
1193
The ` => ` symbol MUST be preceded and succeeded by a space.
1194
1194
@@ -1201,12 +1201,12 @@ The following examples show proper common usage of short closures.
1201
1201
1202
1202
``` php
1203
1203
1204
- $func = fn (int $x, int $y): int => $x + $y;
1204
+ $func = fn(int $x, int $y): int => $x + $y;
1205
1205
1206
- $func = fn (int $x, int $y): int
1206
+ $func = fn(int $x, int $y): int
1207
1207
=> $x + $y;
1208
1208
1209
- $func = fn (
1209
+ $func = fn(
1210
1210
int $x,
1211
1211
int $y,
1212
1212
): int
You can’t perform that action at this time.
0 commit comments