PreferenceCollection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 16
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php namespace Anomaly\PreferencesModule\Preference;
2
3
use Anomaly\PreferencesModule\Preference\Contract\PreferenceInterface;
4
use Anomaly\Streams\Platform\Entry\EntryCollection;
5
6
/**
7
 * Class PreferenceCollection
8
 *
9
 * @link          http://pyrocms.com/
10
 * @author        PyroCMS, Inc. <[email protected]>
11
 * @author        Ryan Thompson <[email protected]>
12
 */
13
class PreferenceCollection extends EntryCollection
14
{
15
16
    /**
17
     * Create a new PreferenceCollection instance.
18
     *
19
     * @param array $items
20
     */
21
    public function __construct($items = [])
22
    {
23
        /* @var PreferenceInterface $item */
24
        foreach ($items as $item) {
25
            $this->items[$item->getKey()] = $item;
26
        }
27
    }
28
}
29