AbstractContentGenerator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
add() 0 1 ?
count() 0 1 ?
A __construct() 0 7 2
1
<?php
2
/**
3
 * @author stev leibelt <[email protected]>
4
 * @since 2014-04-26 
5
 */
6
7
namespace Net\Bazzline\Component\CodeGenerator;
8
9
/**
10
 * Class AbstractContentGenerator
11
 * @package Net\Bazzline\Component\Locator\LocatorGenerator
12
 */
13
abstract class AbstractContentGenerator extends AbstractBasicGenerator
14
{
15
    /**
16
     * @param Indention $indention
17
     * @param null|string|array|GeneratorInterface $content
18
     * @throws InvalidArgumentException
19
     */
20
    public function __construct(Indention $indention, $content = null)
21
    {
22
        $this->setIndention($indention);
23
        if (!is_null($content)) {
24
            $this->add($content);
25
        }
26
    }
27
28
    /**
29
     * @param string|array|GeneratorInterface $content
30
     * @throws InvalidArgumentException
31
     */
32
    abstract public function add($content);
33
34
    /**
35
     * @return int
36
     */
37
    abstract public function count();
38
}