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/21472e53-f69b-4e63-81d7-2322fe55aa7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to