Skip to content

Commit e3e4037

Browse files
committed
Soften rules for short-hooks.
1 parent a8d1a28 commit e3e4037

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,8 @@ For a `set` hook, if the argument name and type do not need to be redefined, the
828828
If a hook consists of a single expression, then PHP allows it to be shortened using `=>`. In that case:
829829

830830
* There MUST be a single space on either side of the `=>` symbol.
831-
* The body MUST be on the same line as the hook declaration and MUST NOT be wrapped. If wrapping is necessary to keep the line within the line length or desired for other reasons the short-hook syntax MUST NOT be used.
831+
* The body MUST begin on the same line as the hook name and `=>`.
832+
* Wrapping is allowed if the expression used allows for wrapping, using the rules defined elsewhere in this document.
832833

833834
```php
834835
class Example

0 commit comments

Comments
 (0)