Skip to content

Commit 6dfd0ab

Browse files
CrellTimWolla
andauthored
Disallow very-long short-hooks.
Co-authored-by: Tim Düsterhus <[email protected]>
1 parent 7901d61 commit 6dfd0ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec.md

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

831831
* There MUST be a single space on either side of the `=>` symbol.
832-
* The body MUST be on the same line as the hook declaration, unless it gets prohibitively long. If it gets prohibitively long, the developer SHOULD consider not using the short-hook syntax.
832+
* 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.
833833

834834
```php
835835
class Example

0 commit comments

Comments
 (0)