This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
11
{
12
/**
13
* @var ExpressionInterface $wrappedExpression
14
*/
15
private $wrappedExpression;
16
17
/**
18
* @var ExpressionInterface $wrappedExpression
19
*/
20
private $from;
21
22
/**
23
* @var ExpressionInterface $wrappedExpression
24
*/
25
private $to;
26
27
/**
28
* @param ExpressionInterface $expression
29
* @param ExpressionInterface $from
30
* @param ExpressionInterface $to
31
*/
32
public function __construct(ExpressionInterface $expression, ExpressionInterface $from, ExpressionInterface $to)
33
{
34
$this->wrappedExpression = $expression;
35
$this->from = $from;
36
$this->to = $to;
37
}
38
39
/**
40
* @inheritdoc
41
*/
42
public function compile()
43
{
44
return $this->wrappedExpression->compile() . ' NOT BETWEEN ' . $this->from->compile() . ' AND ' . $this->to->compile();
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.