Thanks for the response!

So to be clear, the lines are referencing the class? I guess there was just 
some ambiguity based on how braces can refer to the implements and extends 
keyword, it could make sense to add "*for the class*" to those lines as 
well to be consistent with the line above, although I'm not sure what it 
looks like to change that.

Unrelated, is it completely allowed with PSR-12 to have additional blank 
lines following opening braces in methods?

On Monday, November 29, 2021 at 6:24:51 PM UTC-5 [email protected] wrote:

> Hi Shawn,
> You can trust the section header, those lines are referring to style when 
> dealing with implements and extends. 
>
> The reason we are so verbose in this spot is partly because some of this 
> is left verbatim from PSR-2 as we added around it and partly because we 
> want to be sure we cover all bases when dealing with single line vs 
> multi-line class declaration lines.
>
> On Mon, Nov 29, 2021, 10:16 AM Shawn Corrigan <[email protected]> wrote:
>
>> Hi everyone,
>>
>> I tried to find an answer to this in the existing conversations here but 
>> I couldn't seem to find anything, I apologize if it's already been 
>> discussed.
>>
>> I'm reading PSR-12 and trying to understand what these two lines mean. 
>> They seem to be disconnected from the subsection they're in, so it's hard 
>> to tell what it's referring to exactly.
>>
>> Lines 255 and 256 
>> <https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md?plain=1#L255-L256>
>>  are 
>> under subsection 4.1 -  *Extends and Implements. *They are also under 
>> section 4 - 
>>
>> *Classes, Properties, and Methods.*They say...
>>
>> > Opening braces MUST be on their own line and MUST NOT be preceded or 
>> followed by a blank line
>> > Closing braces MUST be on their own line and MUST NOT be preceded by a 
>> blank line.
>>
>> There are no opening or closing braces directly associated with the 
>> "extends" or "implements" keywords, just for the class.
>>
>> Above that, in the same section, it says “The opening brace *for the 
>> class* MUST […]”. That line explicitly specifies the brace is for the 
>> class, but the two lines in question don't specify what the braces are for.
>>
>> Are those lines referring to the class, just as the line above it is? Or 
>> is it referring to the section title; *Classes, Properties, and Methods*? 
>> (leaving out properties).
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "PHP Framework Interoperability Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/php-fig/ef016517-32bd-4f83-9ad6-443d8e5c2244n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/php-fig/ef016517-32bd-4f83-9ad6-443d8e5c2244n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/d952b08c-2b07-4c39-a6aa-58ae887f6193n%40googlegroups.com.

Reply via email to