UniqueConstraint   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
c 2
b 0
f 1
lcom 1
cbo 2
dl 0
loc 20
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 7 1
1
<?php
2
3
namespace LaravelDoctrine\Fluent\Builders;
4
5
use LaravelDoctrine\Fluent\Buildable;
6
7
class UniqueConstraint extends Index implements Buildable
8
{
9
    /**
10
     * Suffix to be added to the index key name
11
     *
12
     * @var string
13
     */
14
    protected $suffix = 'unique';
15
16
    /**
17
     * Execute the build process
18
     */
19 3
    public function build()
20
    {
21 3
        $this->builder->addUniqueConstraint(
22 3
            $this->getColumns(),
23 3
            $this->getName()
24 3
        );
25 3
    }
26
}
27