Passed
Push — master ( 3c0766...793f0f )
by Chris
05:28
created

AbstractChecklistSelectionProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A provideItem() 0 6 1
1
<?php
2
3
namespace WebTheory\Saveyour\Fields\Selections;
4
5
use WebTheory\Saveyour\Contracts\SelectionProviderInterface;
6
7
abstract class AbstractChecklistSelectionProvider extends AbstractSelectionProvider implements SelectionProviderInterface
8
{
9
    /**
10
     *
11
     */
12
    protected function provideItem($item)
13
    {
14
        return [
15
            'value' => $this->provideItemValue($item),
16
            'label' => $this->provideItemLabel($item),
17
            'id' => $this->provideItemId($item)
18
        ];
19
    }
20
21
    /**
22
     *
23
     */
24
    abstract protected function provideItemValue($item): string;
25
26
    /**
27
     *
28
     */
29
    abstract protected function provideItemId($item): string;
30
31
    /**
32
     *
33
     */
34
    abstract protected function provideItemLabel($item): string;
35
}
36