Add   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 63
c 0
b 0
f 0
ccs 12
cts 12
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getSourcePath() 0 4 1
A setSourcePath() 0 4 1
A getDestPath() 0 4 1
A setDestPath() 0 4 1
A getMessageSuccess() 0 4 1
1
<?php
2
namespace AppBundle\Sync\Entity\Task;
3
4
use AppBundle\Sync\Entity\Task;
5
6
/**
7
 * "Add" task
8
 *
9
 * @author Sergey Sadovoi <[email protected]>
10
 */
11
class Add extends Task
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    protected $name = 'add';
17
    /**
18
     * @var string  Source path
19
     */
20
    protected $sourcePath;
21
    /**
22
     * @var string  Dest path
23
     */
24
    protected $destPath;
25
26
    /**
27
     * Get source path
28
     *
29
     * @return string
30
     */
31 3
    public function getSourcePath()
32
    {
33 3
        return $this->sourcePath;
34
    }
35
36
    /**
37
     * Set source path
38
     *
39
     * @param string $sourcePath
40
     */
41 2
    public function setSourcePath($sourcePath)
42
    {
43 2
        $this->sourcePath = $sourcePath;
44 2
    }
45
46
    /**
47
     * Get dest path
48
     *
49
     * @return string
50
     */
51 3
    public function getDestPath()
52
    {
53 3
        return $this->destPath;
54
    }
55
56
    /**
57
     * Set dest path
58
     *
59
     * @param string $destPath
60
     */
61 2
    public function setDestPath($destPath)
62
    {
63 2
        $this->destPath = $destPath;
64 2
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69 2
    public function getMessageSuccess()
70
    {
71 2
        return sprintf('Copied %s', basename($this->getSourcePath()));
72
    }
73
}
74