SwitchCaseNode   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
1
<?php
2
/**
3
 * @author Gerard van Helden <[email protected]>
4
 * @copyright Zicht Online <http://zicht.nl>
5
 */
6
namespace Zicht\Bundle\FrameworkExtraBundle\Twig\ControlStructures;
7
8
use Twig_Node;
9
10
/**
11
 * Represents a 'case' or a 'default' inside a switch
12
 */
13
class SwitchCaseNode extends Twig_Node
14
{
15
    /**
16
     * Constructor
17
     *
18
     * @param array $body
19
     * @param array $expression
20
     * @param int $fallthrough
21
     * @param int $lineno
22
     * @param null $tag
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $tag is correct as it would always require null to be passed?
Loading history...
23
     */
24
    public function __construct($body, $expression, $fallthrough, $lineno = 0, $tag = null)
25
    {
26
        parent::__construct(
27
            array(
28
                'body' => $body
29
            ),
30
            array(
31
                'expression'  => $expression,
32
                'fallthrough' => $fallthrough
33
            ),
34
            $lineno,
35
            $tag
36
        );
37
    }
38
}
39