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

SplitPart::customiseFunction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
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