Passed
Push — update-dev-dependencies ( ac0b1d...13ec54 )
by Martin
04:45 queued 02:55
created

DateOverlaps   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A customiseFunction() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions;
6
7
/**
8
 * Implementation of PostgreSql check if left date interval overlaps with right interval.
9
 *
10
 * @see https://www.postgresql.org/docs/9.6/functions-datetime.html
11
 * @since 1.7.0
12
 *
13
 * @author Ramil Gallyamov <[email protected]>
14
 */
15
class DateOverlaps extends BaseFunction
16
{
17
    protected function customiseFunction(): void
18
    {
19
        $this->setFunctionPrototype('(%s, %s) OVERLAPS (%s, %s)');
20
        $this->addNodeMapping('StringExpression');
21
        $this->addNodeMapping('StringExpression');
22
        $this->addNodeMapping('StringExpression');
23
        $this->addNodeMapping('StringExpression');
24
    }
25
}
26