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

Json   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A encode() 0 3 1
1
<?php
2
3
namespace kalanis\UploadPerPartes\Target\Local\DrivingFile\KeyEncoders;
4
5
6
use kalanis\UploadPerPartes\Interfaces;
7
use kalanis\UploadPerPartes\Uploader\Data;
8
9
10
/**
11
 * Class Json
12
 * @package kalanis\UploadPerPartes\Target\Local\DrivingFile\KeyEncoders
13
 * Driver file - format JSON
14
 */
15
class Json extends AEncoder implements
16
    Interfaces\Storages\ForClient,
17
    Interfaces\Storages\ForFiles,
18
    Interfaces\Storages\ForKV,
19
    Interfaces\Storages\ForStorage,
20
    Interfaces\Storages\ForVolume
21
{
22
    public function encode(Data $data): string
23
    {
24
        return strval(json_encode($data));
25
    }
26
}
27