LTreeExtension::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\LTree;
6
7
use Umbrellio\LTree\Schema\Grammars\LTreeSchemaGrammar;
8
use Umbrellio\LTree\Schema\LTreeBlueprint;
9
use Umbrellio\LTree\Types\LTreeType;
10
use Umbrellio\Postgres\Extensions\AbstractExtension;
11
use Umbrellio\Postgres\Schema\Blueprint;
12
use Umbrellio\Postgres\Schema\Grammars\PostgresGrammar;
13
14
class LTreeExtension extends AbstractExtension
15
{
16
    public const NAME = LTreeType::TYPE_NAME;
17
18 52
    public static function getMixins(): array
19
    {
20 52
        return [
21 52
            LTreeBlueprint::class => Blueprint::class,
22 52
            LTreeSchemaGrammar::class => PostgresGrammar::class,
23 52
        ];
24
    }
25
26 52
    public static function getName(): string
27
    {
28 52
        return static::NAME;
29
    }
30
31 52
    public static function getTypes(): array
32
    {
33 52
        return [
34 52
            static::NAME => LTreeType::class,
35 52
        ];
36
    }
37
}
38