Passed
Pull Request — v3 (#613)
by
unknown
04:35 queued 02:19
created

Base::getOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of GameQ.
4
 *
5
 * GameQ is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU Lesser General Public License as published by
7
 * the Free Software Foundation; either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * GameQ is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU Lesser General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Lesser General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18
19
namespace GameQ\Filters;
20
21
use GameQ\Server;
22
23
/**
24
 * Abstract base class which all filters must inherit
25
 *
26
 * @author Austin Bischoff <[email protected]>
27
 */
28
abstract class Base
29
{
30
31
    /**
32
     * Holds the options for this instance of the filter
33
     *
34
     * @type array
35
     */
36
    protected $options = [];
37
38
    /**
39
     * Construct
40
     *
41
     * @param array $options
42
     */
43 96
    public function __construct(array $options = [])
44
    {
45
46 96
        $this->options = $options;
47 48
    }
48
49 24
    public function getOptions()
50
    {
51 24
        return $this->options;
52
    }
53
54
    /**
55
     * Apply the filter to the data
56
     *
57
     * @param array         $result
58
     * @param \GameQ\Server $server
59
     *
60
     * @return mixed
61
     */
62
    abstract public function apply(array $result, Server $server);
63
}
64