Passed
Push — 3.x ( 080893...4e5cb3 )
by Aleksei
09:48
created

PrimaryKey   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cycle\Annotated\Annotation\Table;
6
7
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
8
use Doctrine\Common\Annotations\Annotation\Target;
9
10
/**
11
 * @Annotation
12
 * @NamedArgumentConstructor
13
 * @Target("ANNOTATION", "CLASS")
14
 */
15
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
16
class PrimaryKey extends Index
17
{
18 12
    public function __construct(array $columns = [])
19
    {
20 12
        $unique = true;
21 12
        $name = 'PK';
22
23 12
        parent::__construct(
24 12
            columns: $columns,
25
            unique: $unique,
26
            name: $name
27
        );
28 12
    }
29
}
30