Completed
Push — ezp25376-fields_groups ( 68c1d3 )
by
unknown
32:29
created

SettingsFieldsGroupsList   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 24
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getGroups() 0 4 1
A getDefaultGroup() 0 4 1
1
<?php
2
/**
3
 * This file is part of the ezpublish-kernel package.
4
 * @license For full copyright and license information view LICENSE file distributed with this source code.
5
 */
6
namespace eZ\Publish\Core\FieldsGroups;
7
8
/**
9
 * A fields groups list implementation based on settings (scalar values) injection.
10
 *
11
 * @internal meant to be instantiated by the DIC. Do not inherit from it or instantiate it manually.
12
 */
13
final class SettingsFieldsGroupsList implements FieldsGroupsList
14
{
15
    /** @var array */
16
    private $groups;
17
18
    /** @var string */
19
    private $defaultGroup;
20
21
    public function __construct($defaultGroup, array $groups)
22
    {
23
        $this->groups = $groups;
24
        $this->defaultGroup = $defaultGroup;
25
    }
26
27
    public function getGroups()
28
    {
29
        return $this->groups;
30
    }
31
32
    public function getDefaultGroup()
33
    {
34
        return $this->defaultGroup;
35
    }
36
}
37