for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Jean Silva <[email protected]>
* @license MIT
*/
namespace Jeancsil\FlightSpy\Notifier;
use Jeancsil\FlightSpy\Api\DataTransfer\SessionParameters;
class Deal
{
* @var SessionParameters
private $sessionParameters;
* @var float
private $price;
* @var string
private $agentName;
private $deepLinkUrl;
public function __construct(SessionParameters $sessionParameters, $price, $agentName, $deepLinkUrl)
$this->sessionParameters = $sessionParameters;
$this->price = $price;
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.
$this->agentName = $agentName;
$this->deepLinkUrl = $deepLinkUrl;
}
* @return float
public function getPrice()
return $this->price;
* @return string
public function getAgentName()
return $this->agentName;
public function getDeepLinkUrl()
return $this->deepLinkUrl;
public function getIdentifier()
return md5(
sprintf(
'%s%s%s',
$this->agentName,
$this->price,
$this->sessionParameters
)
);
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.