InterfaceGenerator::addExtends()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 2
1
<?php
2
/**
3
 * @author stev leibelt <[email protected]>
4
 * @since 2015-01-04 
5
 */
6
7
namespace Net\Bazzline\Component\CodeGenerator;
8
9
/**
10
 * Class InterfaceGenerator
11
 * @package Net\Bazzline\Component\CodeGenerator
12
 */
13
class InterfaceGenerator extends SignatureGenerator
14
{
15
    /**
16
     * @param string $name
17
     * @param boolean $addToUse
18
     * @return $this
19
     */
20
    public function addExtends($name, $addToUse = false)
21
    {
22
        $this->addGeneratorProperty('extends', (string) $name);
23
24
        if ($addToUse) {
25
            $this->addUse($name);
26
        }
27
28
        return $this;
29
    }
30
31
    protected function executePregenertionHook()
32
    {
33
        $this->addGeneratorProperty('interface', true, false);
34
    }
35
}