Completed
Push — master ( 5ac91e...39483e )
by Kirill
38:30
created

BaseTypeDefinition   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 17
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTypeName() 0 6 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\SDL\Base\Definitions;
11
12
use Railt\SDL\Contracts\Definitions\TypeDefinition;
13
14
/**
15
 * Class BaseTypeDefinition
16
 */
17
abstract class BaseTypeDefinition extends BaseDefinition implements TypeDefinition
18
{
19
    /**
20
     * Type definition name
21
     */
22
    protected const TYPE_NAME = '';
23
24
    /**
25
     * @return string
26
     */
27 3238
    public function getTypeName(): string
28
    {
29 3238
        \assert(static::TYPE_NAME !== '', 'Type name must be initialized');
30
31 3238
        return static::TYPE_NAME;
32
    }
33
}
34