Completed
Push — master ( 934cdf...8f45fc )
by Johnny
01:43
created

AbstractReport::getNewfiles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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