Issues (195)

lib/Analyzer/SequenceResult.php (1 issue)

1
<?php
2
3
/**
4
 * @copyright Copyright (c) 2018 Matthias Held <[email protected]>
5
 * @author Matthias Held <[email protected]>
6
 * @license GNU AGPL version 3 or any later version
7
 *
8
 * This program is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU Affero General Public License as
10
 * published by the Free Software Foundation, either version 3 of the
11
 * License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU Affero General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public License
19
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
 */
21
22
namespace OCA\RansomwareDetection\Analyzer;
23
24
class SequenceResult implements \JsonSerializable
25
{
26
    /** @var int */
27
    protected $sequenceId;
28
29
    /** @var float */
30
    protected $fileSuspicion;
31
32
    /** @var float */
33
    protected $quantities;
34
35
    /** @var int */
36
    protected $fileTypeFunnelling;
37
38
    /** @var int */
39
    protected $entropyFunnelling;
40
41
    /** @var float */
42
    protected $suspicionScore;
43
44
    /** @var int */
45
    protected $sizeWritten;
46
47
    /** @var int */
48
    protected $sizeDeleted;
49
50
    /** @var array */
51
    protected $sequence;
52
53
    /**
54
     * @param int   $sequenceId
55
     * @param float $fileSuspicion
56
     * @param float $quantities
57
     * @param float $fileTypeFunnelling
58
     * @param float $suspicionScore
59
     * @param array $sequence
60
     */
61
    public function __construct(
62
        $sequenceId,
63
        $fileSuspicion,
64
        $quantities,
65
        $fileTypeFunnelling,
66
        $suspicionScore,
67
        $sequence
68
    ) {
69
        $this->sequenceId = $sequenceId;
70
        $this->fileSuspicion = $fileSuspicion;
71
        $this->quantities = $quantities;
72
        $this->fileTypeFunnelling = $fileTypeFunnelling;
73
        $this->suspicionScore = $suspicionScore;
74
        $this->sequence = $sequence;
75
    }
76
77
    public function getSequenceId()
78
    {
79
        return $this->sequenceId;
80
    }
81
82
    public function setSequenceId($sequenceId)
83
    {
84
        $this->sequenceId = $sequenceId;
85
    }
86
87
    public function getFileSuspicion()
88
    {
89
        return $this->fileSuspicion;
90
    }
91
92
    public function setFileSuspicion($fileSuspicion)
93
    {
94
        $this->fileSuspicion = $fileSuspicion;
95
    }
96
97
    public function getQuantities()
98
    {
99
        return $this->quantities;
100
    }
101
102
    public function setQuantities($quantities)
103
    {
104
        $this->quantities = $quantities;
105
    }
106
107
    public function getFileTypeFunnelling()
108
    {
109
        return $this->fileTypeFunnelling;
110
    }
111
112
    public function setFileTypeFunnelling($fileTypeFunnelling)
113
    {
114
        $this->fileTypeFunnelling = $fileTypeFunnelling;
115
    }
116
117
    public function getEntropyFunnelling()
118
    {
119
        return $this->entropyFunnelling;
120
    }
121
122
    public function setEntropyFunnelling($entropyFunnelling)
123
    {
124
        $this->entropyFunnelling = $entropyFunnelling;
125
    }
126
127
    public function getSuspicionScore()
128
    {
129
        return $this->suspicionScore;
130
    }
131
132
    public function setSuspicionScore($suspicionScore)
133
    {
134
        $this->suspicionScore = $suspicionScore;
135
    }
136
137
    public function setSizeWritten($sizeWritten)
138
    {
139
        $this->sizeWritten = $sizeWritten;
140
    }
141
142
    public function getSizeWritten()
143
    {
144
        return $this->sizeWritten;
145
    }
146
147
    public function setSizeDeleted($sizeDeleted)
148
    {
149
        $this->sizeDeleted = $sizeDeleted;
150
    }
151
152
    public function getSizeDeleted()
153
    {
154
        return $this->sizeDeleted;
155
    }
156
157
    public function getSequence()
158
    {
159
        return $sequence;
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $sequence seems to be never defined.
Loading history...
160
    }
161
162
    public function setSequence($sequence)
163
    {
164
        $this->sequence = $sequence;
165
    }
166
167
    public function jsonSerialize()
168
    {
169
        return get_object_vars($this);
170
    }
171
}
172