for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PHPSA\Analyzer\Pass\Statement;
use PhpParser\Node\Stmt\Static_;
use PHPSA\Analyzer\Pass;
use PHPSA\Context;
class StaticUsage implements Pass\AnalyzerPassInterface
{
/**
* @param Static_ $stmt
* @param Context $context
*
* @return bool
*/
public function pass(Static_ $stmt, Context $context)
$context->notice(
'static_usage',
'Do not use static variable scoping',
$stmt
);
return true;
}
* @return array
public function getRegister()
return [
Static_::class,
];