Failed Conditions
Pull Request — master (#7184)
by
unknown
37:23
created

Between   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 35
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Query\Expr;
6
7
final class Between
8
{
9
    public const NOT_BETWEEN = 'NOT BETWEEN';
10
11
    public const BETWEEN = 'BETWEEN';
12
13
    /** @var string */
14
    private $operator;
15
16
    /** @var int|string */
17
    private $key;
18
19
    /** @var int|string */
20
    private $min;
21
22
    /** @var int|string */
23
    private $max;
24
25
    /**
26
     * @param string     $operator
0 ignored issues
show
introduced by
Method \Doctrine\ORM\Query\Expr\Between::__construct() has useless @param annotation for parameter $operator.
Loading history...
27
     * @param int|string $key
28
     * @param int|string $min
29
     * @param int|string $max
30
     */
31 1
    public function __construct(string $operator, $key, $min, $max)
32
    {
33 1
        $this->operator = $operator;
34 1
        $this->key      = $key;
35 1
        $this->min      = $min;
36 1
        $this->max      = $max;
37 1
    }
38
39 1
    public function __toString() : string
40
    {
41 1
        return $this->key . ' ' . $this->operator . ' ' . $this->min . ' AND ' . $this->max;
42
    }
43
}
44