Test Failed
Pull Request — master (#191)
by Def
03:54 queued 17s
created

ColumnSchemaBuilder::getDefault()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
c 0
b 0
f 0
nc 2
nop 0
dl 0
loc 7
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Mssql;
6
7
use Yiisoft\Db\Expression\Expression;
8
use Yiisoft\Db\Schema\AbstractColumnSchemaBuilder;
9
10
final class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
11
{
12
    /**
13
     * Getting the `Default` value for constraint
14
     *
15
     * @return Expression|string|null
16
     */
17
    public function getDefault(): Expression|string|null
18
    {
19
        if ($this->default instanceof Expression) {
20
            return $this->default;
21
        }
22
23
        return $this->buildDefaultValue();
0 ignored issues
show
Bug introduced by
The method buildDefaultValue() does not exist on Yiisoft\Db\Mssql\ColumnSchemaBuilder. Did you maybe mean buildDefaultString()? ( Ignorable by Annotation )

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

23
        return $this->/** @scrutinizer ignore-call */ buildDefaultValue();

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...
24
    }
25
}
26