Client   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A remove() 0 3 1
A exists() 0 3 1
A get() 0 3 1
A store() 0 3 1
A checkKeyEncoder() 0 4 1
1
<?php
2
3
namespace kalanis\UploadPerPartes\Target\Local\DrivingFile\Storage;
4
5
6
use kalanis\UploadPerPartes\Interfaces;
7
use kalanis\UploadPerPartes\Target\Local\DrivingFile;
8
use kalanis\UploadPerPartes\Traits\TLangInit;
9
10
11
/**
12
 * Class Client
13
 * @package kalanis\UploadPerPartes\Target\Local\DrivingFile\Storage
14
 * Storing driving file data at client in system data roundabout
15
 */
16
class Client implements Interfaces\IDrivingFile
17
{
18
    use TLangInit;
19
20 2
    public function exists(string $key): bool
21
    {
22 2
        return !empty($key);
23
    }
24
25 2
    public function store(string $key, string $data): string
26
    {
27 2
        return $data;
28
    }
29
30 2
    public function get(string $key): string
31
    {
32 2
        return $key;
33
    }
34
35 2
    public function remove(string $key): bool
36
    {
37 2
        return true;
38
    }
39
40 2
    public function checkKeyEncoder(DrivingFile\KeyEncoders\AEncoder $encoder): bool
41
    {
42
        // skip, key is ignored
43 2
        return true;
44
    }
45
}
46