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

AbstractChecklistSelectionProvider::provideItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 6
cp 0
crap 2
rs 10
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