Failed Conditions
Push — master ( ecccd5...ae55c7 )
by Marco
33s
created

IntegerType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 2
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A describe() 0 3 1
A validate() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Annotations\Type;
6
7
use function is_int;
8
9
/**
10
 * @internal
11
 */
12
class IntegerType implements ScalarType
13
{
14 32
    public function describe() : string
15
    {
16 32
        return 'int';
17
    }
18
19
    /**
20
     * @param mixed $value
21
     */
22 68
    public function validate($value) : bool
23
    {
24 68
        return is_int($value);
25
    }
26
}
27