Completed
Push — master ( 1358d6...984c1e )
by Karsten
01:40
created

IsInRange::__invoke()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 2
eloc 2
nc 2
nop 1
crap 2
1
<?php
2
/**
3
 * File was created 29.05.2015 21:25
4
 *
5
 * @author Karsten J. Gerber <[email protected]>
6
 */
7
namespace PeekAndPoke\Component\Psi\Psi;
8
9
use PeekAndPoke\Component\Psi\Functions\Unary\AbstractParameterizedUnaryFunction;
10
11
/**
12
 * GreaterThanOrEqual does a non type safe comparison "=="
13
 *
14
 * @author Karsten J. Gerber <[email protected]>
15
 */
16
class IsInRange extends AbstractParameterizedUnaryFunction
17
{
18
    /**
19
     * @param mixed $input
20
     *
21
     * @return bool
22
     */
23 16
    public function __invoke($input)
24
    {
25 16
        return $input >= $this->getValue() && $input <= $this->getValue2();
26
    }
27
}
28