Passed
Push — develop ( eaa894...ad515c )
by Baptiste
01:56
created

AddFile   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 29
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A identity() 0 3 1
A file() 0 3 1
A folder() 0 3 1
A __construct() 0 8 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace PersonalGalaxy\Files\Command;
5
6
use PersonalGalaxy\Files\Entity\{
7
    File\Identity,
8
    Folder\Identity as Folder,
9
};
10
use Innmind\Filesystem\File;
11
12
final class AddFile
13
{
14
    private $identity;
15
    private $folder;
16
    private $file;
17
18 3
    public function __construct(
19
        Identity $identity,
20
        Folder $folder,
21
        File $file
22
    ) {
23 3
        $this->identity = $identity;
24 3
        $this->folder = $folder;
25 3
        $this->file = $file;
26 3
    }
27
28 2
    public function identity(): Identity
29
    {
30 2
        return $this->identity;
31
    }
32
33 3
    public function folder(): Folder
34
    {
35 3
        return $this->folder;
36
    }
37
38 2
    public function file(): File
39
    {
40 2
        return $this->file;
41
    }
42
}
43