Completed
Push — master ( b035c8...ddcf44 )
by Paweł
02:10
created

IntegerType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 6 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Wszetko\Sitemap\Items\DataTypes;
5
6
/**
7
 * Class IntegerType
8
 *
9
 * @package Wszetko\Sitemap\Items\DataTypes
10
 */
11
class IntegerType extends FloatType
12
{
13
    /**
14
     * @return mixed|string|null
15
     */
16 3
    public function getValue()
17
    {
18 3
        $value = parent::getValue();
19
20 3
        return is_null($value) ? null : strval(intval(round($value)));
21
    }
22
}