FileEntry   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
dl 0
loc 56
ccs 22
cts 22
cp 1
rs 10
c 1
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getMimeType() 0 3 1
A getTempName() 0 3 1
A getSize() 0 3 1
A getError() 0 3 1
A getKey() 0 3 1
A setData() 0 9 1
A getValue() 0 3 1
A getSource() 0 3 1
1
<?php
2
3
namespace kalanis\kw_forms\Adapters;
4
5
6
use kalanis\kw_input\Interfaces\IFileEntry;
7
8
9
class FileEntry implements IFileEntry
10
{
11
    protected string $key = '';
12
    protected string $value = '';
13
    protected string $temp = '';
14
    protected string $mime = '';
15
    protected int $error = 0;
16
    protected int $size = 0;
17
18 7
    public function setData(string $key, string $value, string $temp, string $mime, int $error, int $size): self
19
    {
20 7
        $this->key = $key;
21 7
        $this->value = $value;
22 7
        $this->temp = $temp;
23 7
        $this->mime = $mime;
24 7
        $this->error = $error;
25 7
        $this->size = $size;
26 7
        return $this;
27
    }
28
29 7
    public function getKey(): string
30
    {
31 7
        return $this->key;
32
    }
33
34
    /**
35
     * @return string
36
     */
37 1
    public function getValue()
38
    {
39 1
        return $this->value;
40
    }
41
42 2
    public function getMimeType(): string
43
    {
44 2
        return $this->mime;
45
    }
46
47 2
    public function getTempName(): string
48
    {
49 2
        return $this->temp;
50
    }
51
52 2
    public function getError(): int
53
    {
54 2
        return $this->error;
55
    }
56
57 2
    public function getSize(): int
58
    {
59 2
        return $this->size;
60
    }
61
62 1
    public function getSource(): string
63
    {
64 1
        return static::SOURCE_FILES;
65
    }
66
}
67