Passed
Push — master ( a90def...5de986 )
by Chris
04:49
created

CompositeSelectionFromMap   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 16
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A defineSelectionLabel() 0 3 1
A defineSelectionId() 0 3 1
1
<?php
2
3
namespace WebTheory\Saveyour\Selections;
4
5
use WebTheory\Saveyour\Contracts\CompositeFieldSelectionProviderInterface;
6
7
class CompositeSelectionFromMap extends AbstractSelectionFromMap implements CompositeFieldSelectionProviderInterface
8
{
9
    /**
10
     *
11
     */
12
    public function defineSelectionId($item): string
13
    {
14
        return $item['id'];
15
    }
16
17
    /**
18
     *
19
     */
20
    public function defineSelectionLabel($item): string
21
    {
22
        return $item['label'];
23
    }
24
}
25