IntegerType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 3
c 1
b 1
f 0
dl 0
loc 10
ccs 3
cts 3
cp 1
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 5 2
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Wszetko Sitemap.
7
 *
8
 * (c) Paweł Kłopotek-Główczewski <[email protected]>
9
 *
10
 * This source file is subject to the MIT license that is bundled
11
 * with this source code in the file LICENSE.
12
 */
13
14
namespace Wszetko\Sitemap\Items\DataTypes;
15
16
/**
17
 * Class IntegerType.
18
 *
19
 * @package Wszetko\Sitemap\Items\DataTypes
20
 */
21
class IntegerType extends FloatType
22
{
23
    /**
24
     * @inheritDoc
25
     */
26 42
    public function getValue()
27
    {
28 42
        $value = parent::getValue();
29
30 42
        return null === $value ? null : (string) round((float) $value);
31
    }
32
}
33