Primary::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Storage package
5
 *
6
 * (c) Michal Wachowski <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Moss\Storage\Model\Definition\Index;
13
14
/**
15
 * Defines primary key
16
 *
17
 * @author  Michal Wachowski <[email protected]>
18
 * @package Moss\Storage
19
 */
20
class Primary extends Index
21
{
22
    /**
23
     * Constructor
24
     *
25
     * @param array $fields
26
     */
27
    public function __construct(array $fields)
28
    {
29
        $this->name = 'primary';
30
        $this->type = 'primary';
31
32
        $this->assertFields($fields);
33
34
        $this->fields = $fields;
35
    }
36
}
37