Completed
Push — master ( 11831e...ee744f )
by Nikola
08:31
created

BaseActivity   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

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
19
/**
20
 * Class BaseActivity
21
 *
22
 * Prototype for workflow activity.
23
 *
24
 * @package RunOpenCode\Backup\Workflow
25
 */
26
abstract class BaseActivity implements WorkflowActivityInterface
27
{
28
    /**
29
     * @var ProfileInterface
30
     */
31
    protected $profile;
32
33
    /**
34
     * @var BackupInterface
35
     */
36
    protected $backup;
37
38
    /**
39
     * Set current backup.
40
     *
41
     * @param BackupInterface $backup Current backup.
42
     * @return BaseActivity $this Fluent interface.
43
     */
44 6
    public function setBackup(BackupInterface $backup)
45
    {
46 6
        $this->backup = $backup;
47 6
        return $this;
48
    }
49
50
    /**
51
     * Set current profile.
52
     *
53
     * @param ProfileInterface $profile Current profile.
54
     * @return BaseActivity $this Fluent interface.
55
     */
56 6
    public function setProfile(ProfileInterface $profile)
57
    {
58 6
        $this->profile = $profile;
59 6
        return $this;
60
    }
61
}
62