Passed
Push — auto-review ( 61c66e )
by Martin
19:58
created

SplitPart   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A customiseFunction() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions;
6
7
/**
8
 * Implementation of PostgreSql SPLIT_PART().
9
 *
10
 * @see https://www.postgresql.org/docs/15/functions-string.html
11
 */
12
class SplitPart extends BaseFunction
13
{
14
    protected function customiseFunction(): void
15
    {
16
        $this->setFunctionPrototype('split_part(%s, %s, %s)');
17
        $this->addNodeMapping('StringPrimary');
18
        $this->addNodeMapping('StringPrimary');
19
        $this->addNodeMapping('SimpleArithmeticExpression');
20
    }
21
}
22