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

BooleanScalar::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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 BooleanScalar
17
 */
18
class BooleanScalar extends ScalarDefinition
19
{
20
    /**
21
     * @var string
22
     */
23
    public const TYPE_NAME = 'Boolean';
24
25
    /**
26
     * @var string
27
     */
28
    public const TYPE_DESCRIPTION = 'Rebel or Empire? Nope! true or false.';
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 16;
47
    }
48
}
49