for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Fi\CoreBundle\DependencyInjection;
class JsonResponse
{
private $errcode = -123456789;
private $message = '';
private $parms = array();
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.
public function __construct($errcode, $message, $parms = null)
$this->errcode = $errcode;
$this->message = $message;
if ($parms) {
$this->parms = $parms;
}
public function __toString()
return $this->getEncodedResponse();
public function getEncodedResponse()
return json_encode(array('errcode' => $this->errcode, 'message' => $this->message, 'parms' => $this->parms));
public function getArrayResponse()
return array('errcode' => $this->errcode, 'message' => $this->message, 'parms' => $this->parms);
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.