TOperations   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A removeMulti() 0 7 3
1
<?php
2
3
namespace kalanis\kw_storage\Storage\Target;
4
5
6
/**
7
 * Trait TOperations
8
 * @package kalanis\kw_storage\Storage\Target
9
 * Operations over storages - what is similar
10
 */
11
trait TOperations
12
{
13
    abstract public function exists(string $key): bool;
14
15
    abstract public function remove(string $key): bool;
16
17 4
    public function removeMulti(array $keys): array
18
    {
19 4
        $result = [];
20 4
        foreach ($keys as $index => $key) {
21 4
            $result[$index] = $this->exists($key) ? $this->remove($key) : false;
22
        }
23 4
        return $result;
24
    }
25
}
26