Test Failed
Pull Request — main (#371)
by
unknown
21:45 queued 07:10
created

BaseRangeFunction   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMinArgumentCount() 0 3 1
A getMaxArgumentCount() 0 3 1
A getNodeMappingPattern() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions;
6
7
/**
8
 * @see https://www.postgresql.org/docs/17/rangetypes.html
9
 * @since 3.1
10
 *
11
 * @author Jan Klan <[email protected]>
12
 */
13
abstract class BaseRangeFunction extends BaseVariadicFunction
14
{
15
    protected function getNodeMappingPattern(): array
16
    {
17
        return [
18
            'ArithmeticPrimary',
19
            'ArithmeticPrimary',
20
            'StringPrimary',
21
        ];
22
    }
23
24
    protected function getMinArgumentCount(): int
25
    {
26
        return 2;
27
    }
28
29
    protected function getMaxArgumentCount(): int
30
    {
31
        return 3;
32
    }
33
}
34