RemoveFile   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace yiicod\fileupload\events;
4
5
use yii\base\Event;
6
7
/**
8
 * Class RemoveFile
9
 * Remove file event
10
 *
11
 * @author Virchenko Maksim <[email protected]>
12
 *
13
 * @package yiicod\fileupload\events
14
 */
15
class RemoveFile extends Event
16
{
17
    /**
18
     * Removed field file name
19
     *
20
     * @var array
21
     */
22
    public $field;
23
24
    /**
25
     * Upload directory path
26
     *
27
     * @var array
28
     */
29
    public $uploadDir;
30
31
    /**
32
     * Folder path
33
     *
34
     * @var
35
     */
36
    public $folderPath;
37
38
    /**
39
     * RemoveFile constructor.
40
     *
41
     * @param string $field
42
     * @param string $uploadDir
43
     * @param string $folderPath
44
     * @param array $config
45
     */
46
    public function __construct(string $field, string $uploadDir, string $folderPath, array $config = [])
47
    {
48
        parent::__construct($config);
49
50
        $this->field = $field;
0 ignored issues
show
Documentation Bug introduced by
It seems like $field of type string is incompatible with the declared type array of property $field.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
51
        $this->uploadDir = $uploadDir;
0 ignored issues
show
Documentation Bug introduced by
It seems like $uploadDir of type string is incompatible with the declared type array of property $uploadDir.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
52
        $this->folderPath = $folderPath;
53
    }
54
}
55