Test Failed
Push — master ( 3b7232...dbe410 )
by Kirill
02:20
created

DateTimeScalar   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getLine() 0 4 1
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\Reflection\Stdlib\Scalar;
11
12
use Railt\Reflection\Definition\ScalarDefinition;
13
use Railt\Reflection\Document;
14
15
/**
16
 * Class DateTimeScalar
17
 */
18
class DateTimeScalar extends ScalarDefinition
19
{
20
    /**
21
     * @var string
22
     */
23
    public const TYPE_NAME = 'DateTime';
24
25
    /**
26
     * @var string
27
     */
28
    public const TYPE_DESCRIPTION = 'The DateTime scalar conforms to the RFC 3339 profile of the ISO 8601 standard.';
29
30
    /**
31
     * BooleanScalar constructor.
32
     * @param Document $document
33
     */
34 9
    public function __construct(Document $document)
35
    {
36 9
        parent::__construct($document, self::TYPE_NAME);
37
38 9
        $this->withDescription(self::TYPE_DESCRIPTION);
39 9
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getLine(): int
45
    {
46
        return 31;
47
    }
48
}
49