Failed Conditions
Pull Request — master (#7184)
by
unknown
07:12
created

Between::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
27
     * @param int|string $key
28
     * @param int|string $min
29
     * @param int|string $max
30
     */
31
    public function __construct($operator, $key, $min, $max)
32
    {
33
        $this->operator = $operator;
34
        $this->key      = $key;
35
        $this->min      = $min;
36
        $this->max      = $max;
37
    }
38
39
    public function __toString() : string
40
    {
41
        return $this->key . ' ' . $this->operator . ' ' . $this->min . ' AND ' . $this->max;
42
    }
43
}
44