I would concur here.  The spec should be adapted to clarify that all blank 
line rules are single-blank-line rules.

--Larry Garfield

On Sunday, April 22, 2018 9:24:10 PM CDT Joe T. wrote:
> 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/7331407.G5PK7eEle1%40vulcan.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to