i'm not in the WG, but i always restrict to 1 blank line between any two
structures - aside from line after opening *{* and before closing *}* where
no blank line is permitted. Extra blank lines feel like something wasn't
finished. It's just... ew.
-jlt
On Sunday, 22 April 2018 19:52:02 UTC-4, Greg Sherwood wrote:
>
> Hi,
>
> I wrote the PSR-1 and PSR-2 standards for PHP_CodeSniffer and I'm now
> writing a PSR-12 standard as well. I have a question about this section:
>
> 4.2 Using traits
>> ...
>> When the class has nothing after the use import statement, the class
>> closing brace MUST be on the next line after the use import statement.
>> ...
>> Otherwise it MUST have a blank line after the use import statement.
>>
>> <?php
>>
>> namespace Vendor\Package;
>>
>> use Vendor\Package\FirstTrait;
>>
>> class ClassName
>> {
>> use FirstTrait;
>>
>> private $property;
>> }
>
>
> The rule states that the use import statement must have a blank like after
> it, but should PHPCS enforce a single blank line or at least one blank
> line? Is this valid code?
>
> <?php
>
> namespace Vendor\Package;
>
> use Vendor\Package\FirstTrait;
>
> class ClassName
> {
> use FirstTrait;
>
>
>
>
> private $property;
> }
>
> 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/b9175811-0de1-4c11-aff3-e17902997fab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.