for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Solidifier\Defects;
use Solidifier\Defect;
use PhpParser\PrettyPrinter\Standard;
class MagicUsage extends Defect
{
public function getMessage()
$formatter = new Standard();
$code = $formatter->prettyPrint(array($this->node));
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
$a = "a"; $ab = "ab"; $abc = "abc";
will produce issues in the first and second line, while this second example
will produce no issues.
return 'Magic usage : ' . $code;
}
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.