LTreeExtension   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 3
b 0
f 0
dl 0
loc 21
ccs 10
cts 10
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getMixins() 0 5 1
A getTypes() 0 4 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