Completed
Push — master ( 13f027...8d387d )
by Luis
06:18 queued 02:40
created

DigraphConfiguration   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 67
ccs 23
cts 23
cp 1
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A searchRecursively() 0 3 1
A hideProtected() 0 3 1
A hideEmptyBlocks() 0 3 1
A __construct() 0 9 1
A extractAssociations() 0 3 1
A hideMethods() 0 3 1
A hidePrivate() 0 3 1
A hideAttributes() 0 3 1
1
<?php
2
/**
3
 * PHP version 7.1
4
 *
5
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
6
 */
7
8
namespace PhUml\Configuration;
9
10
class DigraphConfiguration
11
{
12
    /** @var bool */
13
    protected $searchRecursively;
14
15
    /** @var bool */
16
    protected $extractAssociations;
17
18
    /** @var bool */
19
    private $hideProtected;
20
21
    /** @var bool */
22
    private $hidePrivate;
23
24
    /** @var bool */
25
    private $hideAttributes;
26
27
    /** @var bool */
28
    private $hideMethods;
29
30
    /** @var bool */
31
    protected $hideEmptyBlocks;
32
33 36
    public function __construct(array $input)
34
    {
35 36
        $this->searchRecursively = (bool)$input['recursive'];
36 36
        $this->extractAssociations = (bool)$input['associations'];
37 36
        $this->hidePrivate = (bool)$input['hide-private'];
38 36
        $this->hideProtected = (bool)$input['hide-protected'];
39 36
        $this->hideAttributes = (bool)$input['hide-attributes'];
40 36
        $this->hideMethods = (bool)$input['hide-methods'];
41 36
        $this->hideEmptyBlocks = (bool)$input['hide-empty-blocks'];
42 36
    }
43
44 27
    public function extractAssociations(): bool
45
    {
46 27
        return $this->extractAssociations;
47
    }
48
49 30
    public function searchRecursively(): bool
50
    {
51 30
        return $this->searchRecursively;
52
    }
53
54 21
    public function hidePrivate(): bool
55
    {
56 21
        return $this->hidePrivate;
57
    }
58
59 21
    public function hideProtected(): bool
60
    {
61 21
        return $this->hideProtected;
62
    }
63
64 27
    public function hideAttributes(): bool
65
    {
66 27
        return $this->hideAttributes;
67
    }
68
69 27
    public function hideMethods(): bool
70
    {
71 27
        return $this->hideMethods;
72
    }
73
74 27
    public function hideEmptyBlocks(): bool
75
    {
76 27
        return $this->hideEmptyBlocks;
77
    }
78
}
79