Passed
Push — master ( 9f7d35...3f1c7e )
by Wilmer
08:50 queued 06:32
created

DefaultValueConstraint::value()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Constraint;
6
7
/**
8
 * DefaultValueConstraint represents the metadata of a table `DEFAULT` constraint.
9
 */
10
class DefaultValueConstraint extends Constraint
11
{
12
    private $value;
13
14 1
    public function getValue()
15
    {
16 1
        return $this->value;
17
    }
18
19
    /**
20
     * @param mixed default value as returned by the DBMS.
21
     *
22
     * @return self
23
     */
24 30
    public function value($value): self
25
    {
26 30
        $this->value = $value;
27
28 30
        return $this;
29
    }
30
}
31