RemoveAllFiles   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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 RemoveAllFiles extends Event
16
{
17
    /**
18
     * Upload directory path
19
     *
20
     * @var array
21
     */
22
    public $uploadDir;
23
24
    /**
25
     * Folder path
26
     *
27
     * @var
28
     */
29
    public $folderPath;
30
31
    /**
32
     * RemoveFile constructor.
33
     *
34
     * @param string $uploadDir
35
     * @param string $folderPath
36
     * @param array $config
37
     */
38
    public function __construct(string $uploadDir, string $folderPath, array $config = [])
39
    {
40
        parent::__construct($config);
41
42
        $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...
43
        $this->folderPath = $folderPath;
44
    }
45
}
46