Integer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
namespace BestServedCold\PhalueObjects\Mathematical;
4
5
use BestServedCold\PhalueObjects\Exception\InvalidTypeException;
6
use BestServedCold\PhalueObjects\Mathematical;
7
8
/**
9
 * Class Integer
10
 *
11
 * @package   BestServedCold\PhalueObjects\Mathematical
12
 * @author    Adam Lewis <[email protected]>
13
 * @copyright Copyright (c) 2015 Best Served Cold Media Limited
14
 * @license   http://http://opensource.org/licenses/GPL-3.0 GPL License
15
 * @link      http://bestservedcold.com
16
 * @since     0.0.1-alpha
17
 * @version   0.0.2-alpha
18
 */
19
class Integer extends Mathematical
20
{
21
    /**
22
     * @param $value
23
     */
24 75
    public function __construct($value)
25
    {
26 75
        if (!is_int($value)) {
27 4
            throw new InvalidTypeException($value, [ 'integer' ]);
28
        }
29
30 75
        parent::__construct($value);
31 75
    }
32
}
33