Completed
Push — master ( 6fad86...9aa46f )
by Johnny
01:50
created

AbstractReport::getModifiedFiles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace Redbox\Scan\Report;
3
4
/**
5
 * This AbstractReport report class contains all the base tools
6
 * needed for Redbox\Scan\Report\Report.
7
 *
8
 * @package Redbox\Scan\Report
9
 */
10
abstract class AbstractReport
11
{
12
    /**
13
     * Return the items
14
     *
15
     * @var array
16
     */
17
    protected $items = array();
18
19
    /**
20
     * @var array
21
     */
22
    protected $newfiles = array();
23
24
    /**
25
     * @var array
26
     */
27
    protected $modifiedFiles = array();
28
29
    /**
30
     * Report title
31
     *
32
     * @var string
33
     */
34
    protected $name = null;
35
36
    /**
37
     * Report path
38
     *
39
     * @var string
40
     */
41
    protected $path = null;
42
43
    /**
44
     * Report data
45
     *
46
     * @var string
47
     */
48
    protected $date = null;
49
50
    /**
51
     * @param array $items
52
     */
53 44
    public function setItems($items)
54
    {
55 44
        $this->items = $items;
56 44
    }
57
58
    /**
59
     * @param array $newfiles
60
     */
61 16
    public function setNewfiles($newfiles)
62
    {
63 16
        $this->newfiles = $newfiles;
64 16
    }
65
66
    /**
67
     * @param array $modifiedFiles
68
     */
69 16
    public function setModifiedFiles($modifiedFiles)
70
    {
71 16
        $this->modifiedFiles = $modifiedFiles;
72 16
    }
73
74
    /**
75
     * @param string $name
76
     */
77 40
    public function setName($name)
78
    {
79 40
        $this->name = $name;
80 40
    }
81
82
    /**
83
     * @param string $date
84
     */
85 40
    public function setDate($date)
86
    {
87 40
        $this->date = $date;
88 40
    }
89
90
    /**
91
     * @param string $path
92
     */
93 40
    public function setPath($path)
94
    {
95 40
        $this->path = $path;
96 40
    }
97
98
    /**
99
     * @return array
100
     */
101 36
    public function getItems()
102
    {
103 36
        return $this->items;
104
    }
105
106
    /**
107
     * @return string
108
     */
109 32
    public function getName()
110
    {
111 32
        return $this->name;
112
    }
113
114
    /**
115
     * @return string
116
     */
117 32
    public function getPath()
118
    {
119 32
        return $this->path;
120
    }
121
122
    /**
123
     * @return array
124
     */
125 16
    public function getNewfiles()
126
    {
127 16
        return $this->newfiles;
128
    }
129
130
    /**
131
     * @return array
132
     */
133 16
    public function getModifiedFiles()
134
    {
135 16
        return $this->modifiedFiles;
136
    }
137
138
    /**
139
     * @return \DateTime
140
     */
141 32
    public function getDate()
142
    {
143 32
        return $this->date;
144
    }
145
146
    /**
147
     * This function will convert our report into an array. This array
148
     * could later be converted into any output the adapter wishes.
149
     *
150
     * @return array
151
     */
152
    abstract public function toArray();
153
}