ContainerNode   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 3
dl 0
loc 17
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A compile() 0 11 2
1
<?php
2
/**
3
 * For licensing information, please see the LICENSE file accompanied with this file.
4
 *
5
 * @author Gerard van Helden <[email protected]>
6
 * @copyright 2012 Gerard van Helden <http://melp.nl>
7
 */
8
9
namespace Zicht\Tool\Container;
10
11
use Zicht\Tool\Script\Buffer;
12
use Zicht\Tool\Script\Node\Branch;
13
use Zicht\Tool\Script\Node\Node;
14
15
/**
16
 * The root node of a container definition
17
 */
18
class ContainerNode extends Branch
19
{
20
    /**
21
     * @{inheritDoc}
22
     */
23
    public function compile(Buffer $buffer)
24
    {
25
        $date = new \DateTime();
26
        $buffer->writeln('/** Container compiled by ' . getenv('USER') . ' at: ' . $date->format('r') . ' */');
27
        $buffer->writeln('use \Zicht\Tool\Debug;');
28
        $buffer->writeln('$z = new \Zicht\Tool\Container\Container();');
29
30
        foreach ($this->nodes as $node) {
31
            $node->compile($buffer);
32
        }
33
    }
34
}
35