IsInteger::__invoke()   A
last analyzed

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
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * File was created 29.05.2015 21:06
4
 *
5
 * @author Karsten J. Gerber <[email protected]>
6
 */
7
8
namespace PeekAndPoke\Component\Psi\Psi;
9
10
use PeekAndPoke\Component\Psi\UnaryFunction;
11
12
/**
13
 * IsInteger checks if the given value is an integer
14
 *
15
 * @see    IsIntegerIsNotIntegerTest
16
 *
17
 * @author Karsten J. Gerber <[email protected]>
18
 */
19
class IsInteger implements UnaryFunction
20
{
21
    /**
22
     * @param mixed $input
23
     *
24
     * @return bool
25
     */
26 18
    public function __invoke($input)
27
    {
28 18
        return is_int($input);
29
    }
30
}
31