InterfaceGenerator::executePregenertionHook()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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