DateType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toArray() 0 7 1
1
<?php
2
3
namespace Kwk\Geckoboard\Dataset\Type;
4
5
use Kwk\Geckoboard\Dataset\TypeInterface;
6
7
class DateType implements TypeInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    private $name;
13
14
    /**
15
     * @param string $name
16
     */
17 3
    public function __construct($name)
18
    {
19 3
        $this->name = $name;
20 3
    }
21
22
    /**
23
     * {@inheritDoc}
24
     */
25 2
    public function toArray()
26
    {
27
        return [
28 2
            'type' => 'date',
29 2
            'name' => $this->name,
30
        ];
31
    }
32
}
33