diff --git a/spec.md b/spec.md index 2c0ba7e..9346fe6 100644 --- a/spec.md +++ b/spec.md @@ -1148,7 +1148,7 @@ $foo->bar( Short closures, also known as arrow functions, MUST follow the same guidelines and principles as long closures above, with the following additions. -The `fn` keyword MUST be preceded and succeeded by a space. +The `fn` keyword MUST be preceded by a space, and MUST NOT be succeeded by a space. The `=>` symbol MUST be preceded and succeeded by a space. @@ -1161,12 +1161,12 @@ The following examples show proper common usage of short closures. ```php -$func = fn (int $x, int $y): int => $x + $y; +$func = fn(int $x, int $y): int => $x + $y; -$func = fn (int $x, int $y): int +$func = fn(int $x, int $y): int => $x + $y; -$func = fn ( +$func = fn( int $x, int $y, ): int