LTreeBlueprint::ltree()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
c 2
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
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\Schema;
6
7
use Illuminate\Support\Fluent;
8
use Umbrellio\LTree\Types\LTreeType;
9
use Umbrellio\Postgres\Extensions\Schema\AbstractBlueprint;
10
11
class LTreeBlueprint extends AbstractBlueprint
12
{
13 52
    public function ltree()
14
    {
15 52
        return function (string $column): Fluent {
16 42
            return $this->addColumn(LTreeType::TYPE_NAME, $column);
0 ignored issues
show
Bug introduced by
The method addColumn() does not exist on Umbrellio\LTree\Schema\LTreeBlueprint. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
            return $this->/** @scrutinizer ignore-call */ addColumn(LTreeType::TYPE_NAME, $column);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
17 52
        };
18
    }
19
}
20