Fix #124 Require parenthesis around clone()#137
Fix #124 Require parenthesis around clone()#137mbeccati wants to merge 1 commit intophp-fig:masterfrom
Conversation
Crell
left a comment
There was a problem hiding this comment.
I'm good with this. Waiting a few days for other WG members to comment if desired.
|
@jrfnl I'm not a native speaker, but to me it feels used would be more appropriate than called when referring to a language construct (vs function). Thoughts? |
|
Question for the interpretation by tooling: The examples have no spacing between the keyword and the open parenthesis and on the inside of the parentheses. Can we conclude that the rule about this for function/method calls (line 781 - 785) also applies to these language constructs ?
|
| ``` | ||
|
|
||
| The `clone` language construct MUST always be used with parenthesis, even when the optional `$withProperties` argument is | ||
| not provided. For example: |
There was a problem hiding this comment.
@jrfnl How about something along the lines of
| not provided. For example: | |
| not provided. As such, it follows the same rules as function calls. For example: |
There was a problem hiding this comment.
I'm not sure it needs to be spelled out as this paragraph is within the "function and method call" section anyway, but I just wanted to clarify to avoid ending up with discussions about this in the PHPCS repo later on.
|
Agreed with @jrfnl about the spacing. Pseudo-function language constructs should always be formatted like functions, without a space. |
Per request from @Crell on Discord ;-)
Resolves #124