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

BaseActivity::setBackup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
crap 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