Passed
Pull Request — master (#6709)
by Sergey
12:37
created

NewObjectExpression::dispatch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Query\AST;
6
7
/**
8
 * NewObjectExpression ::= "NEW" IdentificationVariable "(" NewObjectArg {"," NewObjectArg}* ")"
9
 */
10
class NewObjectExpression extends Node
11
{
12
    /**
13
     * @var string
14
     */
15
    public $className;
16
17
    /**
18
     * @var mixed[]
19
     */
20
    public $args;
21
22
    /**
23
     * @param string  $className
24
     * @param mixed[] $args
25
     */
26 27
    public function __construct($className, array $args)
27
    {
28 27
        $this->className = $className;
29 27
        $this->args      = $args;
30 27
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35 1
    public function dispatch($sqlWalker)
36
    {
37 1
        return $sqlWalker->walkNewObject($this);
38
    }
39
}
40