AbstractContentGenerator::count()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
nc 1
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
}