Thanks for the clarrification.

I'll echo Stefano's thoughts and say that referring to a previous section 
is generally helpful when the standard is being heavily modified (you don't 
want to update 10 places each time), but duplicating those rules once the 
standard moves to review seems like the right thing to do. From that point 
on, you don't expect the standard to ever change, so taking the time to 
duplicate the rules is hopefully a one-off and makes it easier for people 
like me to review and follow.

In this specific case, the fact that only one sentence (out of the 10 in 
the closure section) is being referred to, copying that one into the anon 
class section would make that section much clearer, for me at least.

Greg

On Thursday, 17 May 2018 01:44:43 UTC+10, Alexander Makarov wrote:
>
> 1. The opening brace MUST go on the same line, and the closing brace MUST 
> go on the next line following the body.
>
>
> On Tuesday, April 24, 2018 at 1:53:06 AM UTC+3, Greg Sherwood wrote:
>>
>> Hi,
>>
>> I'm working on the PSR-12 standard for PHP_CodeSniffer. I have a question 
>> about this section:
>>
>> 8. Anonymous Classes
>>> Anonymous Classes MUST follow the same guidelines and principles as 
>>> closures in the above section.
>>
>>
>> Almost the entire closure section of PSR-12 is dedicated to argument 
>> lists (not a bad thing). The only section of it that isn't contains the 
>> following text:
>>
>> Closures MUST be declared with a space after the function keyword, and a 
>>> space before and after the use keyword.
>>> The opening brace MUST go on the same line, and the closing brace MUST 
>>> go on the next line following the body.
>>
>>
>> The first rule doesn't have anything to do with anon classes and the 
>> second is superseded by a more specific rule in the anon classes section.
>>
>> So my question is: What guidelines and principals should I take from the 
>> closure section when writing rules for anon classes?
>>
>> Thanks
>>
>

-- 
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 php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/54859445-974a-4383-84b8-a7925f4bc887%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to