BaseActivity   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 39
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setBackup() 0 5 1
A setProfile() 0 5 1
1
<?php
2
/*
3
 * This file is part of the Backup package, an RunOpenCode project.
4
 *
5
 * (c) 2015 RunOpenCode
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * This project is fork of "kbond/php-backup", for full credits info, please
11
 * view CREDITS file that was distributed with this source code.
12
 */
13
namespace RunOpenCode\Backup\Workflow;
14
15
use RunOpenCode\Backup\Contract\BackupInterface;
16
use RunOpenCode\Backup\Contract\ProfileInterface;
17
use RunOpenCode\Backup\Contract\WorkflowActivityInterface;
18
use RunOpenCode\Backup\Event\EventDispatcherAwareTrait;
19
use RunOpenCode\Backup\Log\LoggerAwareTrait;
20
21
/**
22
 * Class BaseActivity
23
 *
24
 * Prototype for workflow activity.
25
 *
26
 * @package RunOpenCode\Backup\Workflow
27
 */
28
abstract class BaseActivity implements WorkflowActivityInterface
29
{
30
    use LoggerAwareTrait;
31
    use EventDispatcherAwareTrait;
32
33
    /**
34
     * @var ProfileInterface
35
     */
36
    protected $profile;
37
38
    /**
39
     * @var BackupInterface
40
     */
41
    protected $backup;
42
43
    /**
44
     * Set current backup.
45
     *
46
     * @param BackupInterface $backup Current backup.
47
     * @return BaseActivity $this Fluent interface.
48
     */
49 28
    public function setBackup(BackupInterface $backup)
50
    {
51 28
        $this->backup = $backup;
52 28
        return $this;
53
    }
54
55
    /**
56
     * Set current profile.
57
     *
58
     * @param ProfileInterface $profile Current profile.
59
     * @return BaseActivity $this Fluent interface.
60
     */
61 28
    public function setProfile(ProfileInterface $profile)
62
    {
63 28
        $this->profile = $profile;
64 28
        return $this;
65
    }
66
}
67