FlashesNodeFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createFlashesNode() 0 4 1
1
<?php
2
3
namespace Knp\RadBundle\Twig;
4
5
use Twig_NodeInterface;
6
use Twig_Node_Expression;
7
8
class FlashesNodeFactory
9
{
10
    /**
11
     * @todo reintroduct typehints
12
     */
13
    public function createFlashesNode(/* Twig_Node_Expression */ $types = null, /* Twig_Node_Expression */ $catalog = null, Twig_NodeInterface $body, $line)
0 ignored issues
show
Coding Style introduced by
Parameters which have default values should be placed at the end.

If you place a parameter with a default value before a parameter with a default value, the default value of the first parameter will never be used as it will always need to be passed anyway:

// $a must always be passed; it's default value is never used.
function someFunction($a = 5, $b) { }
Loading history...
14
    {
15
        return new FlashesNode($types, $catalog, $body, $line);
16
    }
17
}
18