Completed
Push — master ( 737a42...78c209 )
by Rick
03:30
created

FilterRule::getFilterData()   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

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
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
/**
3
 * Particle.
4
 *
5
 * @link      http://github.com/particle-php for the canonical source repository
6
 * @copyright Copyright (c) 2005-2015 Particle (http://particle-php.com)
7
 * @license   https://github.com/particle-php/Filter/blob/master/LICENSE New BSD License
8
 */
9
namespace Particle\Filter;
10
11
/**
12
 * @package Particle\Filter
13
 */
14
abstract class FilterRule
15
{
16
    /**
17
     * @var string|null
18
     */
19
    protected $encodingFormat;
20
21
    /**
22
     * @var bool
23
     */
24
    protected $allowNotSet = false;
25
26
    /**
27
     * @var array|null
28
     */
29
    protected $filterData;
30
31
    /**
32
     * @param string|null $encodingFormat
33
     */
34 149
    public function setEncodingFormat($encodingFormat)
35
    {
36 149
        $this->encodingFormat = $encodingFormat;
37 149
    }
38
39
    /**
40
     * @param array|null $filterData
41
     */
42 149
    public function setFilterData($filterData)
43
    {
44 149
        $this->filterData = $filterData;
45 149
    }
46
47
    /**
48
     * @return array|null
49
     */
50 5
    public function getFilterData()
51
    {
52 5
        return $this->filterData;
53
    }
54
55
    /**
56
     * @return bool
57
     */
58 10
    public function allowedNotSet()
59
    {
60 10
        return $this->allowNotSet;
61
    }
62
63
    /**
64
     * @param mixed $value
65
     * @return mixed
66
     */
67
    abstract public function filter($value);
68
}
69