Test Failed
Push — master ( e493d7...b1ea68 )
by Petr
11:01
created

Client   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 28
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
    public function exists(string $key): bool
21
    {
22
        return !empty($key);
23
    }
24
25
    public function store(string $key, string $data): string
26
    {
27
        return $data;
28
    }
29
30
    public function get(string $key): string
31
    {
32
        return $key;
33
    }
34
35
    public function remove(string $key): bool
36
    {
37
        return true;
38
    }
39
40
    public function checkKeyEncoder(DrivingFile\KeyEncoders\AEncoder $encoder): bool
41
    {
42
        // skip, key is ignored
43
        return true;
44
    }
45
}
46