MethodCall::getSubNodeNames()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 3
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 3
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace PhpParser\Node\Expr;
4
5
use PhpParser\Node\Arg;
6
use PhpParser\Node\Expr;
7
8 View Code Duplication
class MethodCall extends Expr
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /** @var Expr Variable holding object */
11
    public $var;
12
    /** @var string|Expr Method name */
13
    public $name;
14
    /** @var Arg[] Arguments */
15
    public $args;
16
17
    /**
18
     * Constructs a function call node.
19
     *
20
     * @param Expr        $var        Variable holding object
21
     * @param string|Expr $name       Method name
22
     * @param Arg[]       $args       Arguments
23
     * @param array       $attributes Additional attributes
24
     */
25
    public function __construct(Expr $var, $name, array $args = array(), array $attributes = array()) {
26
        parent::__construct($attributes);
27
        $this->var = $var;
28
        $this->name = $name;
29
        $this->args = $args;
30
    }
31
32
    public function getSubNodeNames() {
33
        return array('var', 'name', 'args');
34
    }
35
}
36