Completed
Push — master ( b133bf...737a42 )
by Rick
04:48
created

FilterRule::allowedNotSet()   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
     * @param string|null $encodingFormat
28
     */
29 147
    public function setEncodingFormat($encodingFormat)
30
    {
31 147
        $this->encodingFormat = $encodingFormat;
32 147
    }
33
34
    /**
35
     * @return bool
36
     */
37 10
    public function allowedNotSet()
38
    {
39 10
        return $this->allowNotSet;
40
    }
41
42
    /**
43
     * @param mixed $value
44
     * @return mixed
45
     */
46
    abstract public function filter($value);
47
}
48