Input   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 6 1
1
<?php
2
3
namespace JhFlexiTime\InputFilter;
4
5
use Zend\InputFilter\Input as ZfBaseInput;
6
7
/**
8
 * Class Input
9
 * @package JhFlexiTime\InputFilter
10
 * @author Aydin Hassan <[email protected]>
11
 */
12
class Input extends ZfBaseInput
13
{
14
    /**
15
     * Overridden to set the context to use the filtered value
16
     * Eg - Dates will actually be DateTime instances
17
     *
18
     *
19
     * @param  mixed $context Extra "context" to provide the validator
20
     * @return bool
21
     */
22
    public function isValid($context = null)
23
    {
24
        //make the context use the filtered value
25
        $context[$this->getName()] =  $this->getValue();
26
        return parent::isValid($context);
27
    }
28
}
29