DoubleType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __toString() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace drupol\valuewrapper\Type;
6
7
use drupol\valuewrapper\Contract\Stringable;
8
9
/**
10
 * Class DoubleType.
11
 */
12
class DoubleType extends TypeValue implements Stringable
13
{
14
    /**
15
     * DoubleType constructor.
16
     *
17
     * @param float $value
18
     */
19 10
    public function __construct(float $value)
20
    {
21 10
        parent::__construct($value);
22 10
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 1
    public function __toString(): string
28
    {
29 1
        return (string) $this->value();
30
    }
31
}
32