Test Failed
Push — master ( a0eed4...bb00ac )
by Kirill
149:40
created

ListValueNode   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A parse() 0 11 2
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\SDL\Frontend\AST\Invocation;
11
12
/**
13
 * Class ListValue
14
 */
15
class ListValueNode extends AbstractValueNode
16
{
17
    /**
18
     * @return array|mixed
19
     */
20
    protected function parse()
21
    {
22
        $result = [];
23
24
        /** @var AstValueInterface $child */
25
        foreach ($this->getChildren() as $child) {
26
            $result[] = $child->toPrimitive();
27
        }
28
29
        return $result;
30
    }
31
}
32