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

DefaultValueConstraint   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A value() 0 5 1
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