FileEntry::getError()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
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