Completed
Pull Request — master (#8)
by Povilas
03:23 queued 01:26
created

Option::getIgnoreFuncs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Povils\PHPMND\Console;
4
5
use Povils\PHPMND\Extension\DefaultExtension;
6
use Povils\PHPMND\Extension\Extension;
7
8
/**
9
 * @package Povils\PHPMND\Console
10
 */
11
class Option
12
{
13
    /**
14
     * @var Extension[]
15
     */
16
    private $extensions;
17
18
    /**
19
     * @var array
20
     */
21
    private $ignoreNumbers = [0, 0., 1];
22
23
    /**
24
     * @var array
25
     */
26
    private $ignoreFuncs = [];
27
28
    public function __construct()
29
    {
30
        $this->extensions[] = new DefaultExtension();
31
    }
32
33
    /**
34
     * @param Extension $extension
35
     */
36
    public function addExtension(Extension $extension)
37
    {
38
        $this->extensions[] = $extension;
39
    }
40
41
    /**]
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
42
     * @return Extension[]
43
     */
44
    public function getExtensions()
45
    {
46
        return $this->extensions;
47
    }
48
49
    /**
50
     * @param array $ignoreNumbers
51
     */
52
    public function setIgnoreNumbers(array $ignoreNumbers)
53
    {
54
        $this->ignoreNumbers = array_merge($this->ignoreNumbers, $ignoreNumbers);
55
    }
56
57
    /**
58
     * @return array
59
     */
60
    public function getIgnoreNumbers()
61
    {
62
        return $this->ignoreNumbers;
63
    }
64
65
    /**
66
     * @param array $ignoreFuncs
67
     */
68
    public function setIgnoreFuncs(array $ignoreFuncs)
69
    {
70
        $this->ignoreFuncs = $ignoreFuncs;
71
    }
72
73
    /**
74
     * @return array
75
     */
76
    public function getIgnoreFuncs()
77
    {
78
        return $this->ignoreFuncs;
79
    }
80
}
81