for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\ORM\Query\Expr;
final class Between
{
public const NOT_BETWEEN = 'NOT BETWEEN';
public const BETWEEN = 'BETWEEN';
/**
* @var string
*/
private $operator;
* @var int|string
private $key;
private $min;
private $max;
* @param string $operator
* @param int|string $key
* @param int|string $min
* @param int|string $max
public function __construct(string $operator, $key, $min, $max)
$this->operator = $operator;
$this->key = $key;
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->min = $min;
$this->max = $max;
}
public function __toString() : string
return sprintf('%s %s %s AND %s', $this->key, $this->operator, $this->min, $this->max);