Passed
Push — master ( 4248bd...b32226 )
by Chris
02:25
created

SelectionFormatterTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 4
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A removeClearControl() 0 5 2
1
<?php
2
3
namespace WebTheory\Saveyour\Concerns;
4
5
trait SelectionFormatterTrait
6
{
7
    /**
8
     *
9
     */
10
    protected function removeClearControl(&$value)
11
    {
12
        if (in_array('', $value)) {
13
            $value = array_filter($value, function ($entry) {
14
                return '' !== $entry;
15
            });
16
        }
17
    }
18
}
19