Test Failed
Push — master ( 08b170...e6bc2a )
by Kirill
02:02
created

ScalarBuilder::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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\SDL\Builder\Definition;
11
12
use Railt\Reflection\Contracts\Definition;
13
use Railt\Reflection\Definition\ScalarDefinition;
14
15
/**
16
 * Class ScalarBuilder
17
 */
18
class ScalarBuilder extends TypeDefinitionBuilder
19
{
20
    /**
21
     * @return Definition
22
     * @throws \Railt\SDL\Exception\SyntaxException
23
     */
24
    public function build(): Definition
25
    {
26
        $scalar = $this->bind(new ScalarDefinition($this->document, $this->getName()));
27
28
        //
29
30
        return $scalar;
31
    }
32
}
33