UploadedFile   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 67
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace yiicod\fileupload\components\common;
4
5
/**
6
 * Class FileParams
7
 * File params for upload handler
8
 *
9
 * @author Virchenko Maksim <[email protected]>
10
 *
11
 * @package yiicod\fileupload\components\base
12
 */
13
class UploadedFile
14
{
15
    /**
16
     * @var string
17
     */
18
    public $filePath;
19
20
    /**
21
     * @var string
22
     */
23
    public $name;
24
25
    /**
26
     * File size
27
     *
28
     * @var int|float
29
     */
30
    public $size;
31
32
    /**
33
     * File type
34
     *
35
     * @var string
36
     */
37
    public $type;
38
39
    /**
40
     * File error
41
     *
42
     * @var null|string
43
     */
44
    public $error;
45
46
    /**
47
     * File index
48
     *
49
     * @var int|null
50
     */
51
    public $index;
52
53
    /**
54
     * @var array|null
55
     */
56
    public $contentRange;
57
58
    /**
59
     * FileParams constructor.
60
     *
61
     * @param string $filePath
62
     * @param string $name
63
     * @param $size
64
     * @param string $type
65
     * @param null|string $error
66
     * @param int|null $index
67
     * @param array|null $contentRange
68
     */
69
    public function __construct(string $filePath, string $name, $size, string $type, ?string $error = null, ?int $index = null, ?array $contentRange = null)
70
    {
71
        $this->filePath = $filePath;
72
        $this->name = $name;
73
        $this->size = $size;
74
        $this->type = $type;
75
        $this->error = $error;
76
        $this->index = $index;
77
        $this->contentRange = $contentRange;
78
    }
79
}
80