InterfaceGenerator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addExtends() 0 10 2
A executePregenertionHook() 0 4 1
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
}