You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PSR2 Namespaces/UseDeclarationSniff does not seem to be validating the When present, all use declarations MUST go after the namespace declaration. rule properly.
Example (passes without any errors!):
<?php
use DateTime;
use Exception;
use Throwable;
namespace App;
class Foo
{
protected $bar;
}
phpcs --version
PHP_CodeSniffer version 3.2.2 (stable) by Squiz (http://www.squiz.net)
Running: phpcs -s --standard=PSR2 test.php
The text was updated successfully, but these errors were encountered:
artureiji
changed the title
PSR2 Namespaces/UseDeclarationSniff validating correctly
PSR2 Namespaces/UseDeclarationSniff not validating correctly
Feb 7, 2018
gsherwood
changed the title
PSR2 Namespaces/UseDeclarationSniff not validating correctly
PSR2.Namespaces.UseDeclaration not giving error for use statements before the namespace declaration
Mar 19, 2018
The PSR2 Namespaces/UseDeclarationSniff does not seem to be validating the
When present, all use declarations MUST go after the namespace declaration.
rule properly.Example (passes without any errors!):
phpcs --version
PHP_CodeSniffer version 3.2.2 (stable) by Squiz (http://www.squiz.net)
Running: phpcs -s --standard=PSR2 test.php
The text was updated successfully, but these errors were encountered: