Completed
Push — master ( 3563e8...eabdc7 )
by Nikola
04:08
created

Profile::getProcessor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
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\Backup;
14
15
use RunOpenCode\Backup\Contract\DestinationInterface;
16
use RunOpenCode\Backup\Contract\NamerInterface;
17
use RunOpenCode\Backup\Contract\ProcessorInterface;
18
use RunOpenCode\Backup\Contract\ProfileInterface;
19
use RunOpenCode\Backup\Contract\RotatorInterface;
20
use RunOpenCode\Backup\Contract\SourceInterface;
21
use RunOpenCode\Backup\Contract\WorkflowInterface;
22
23
/**
24
 * Class Profile
25
 *
26
 * Backup profile.
27
 *
28
 * @package RunOpenCode\Backup\Backup
29
 */
30
final class Profile implements ProfileInterface
31
{
32
    /**
33
     * @var string
34
     */
35
    private $name;
36
37
    /**
38
     * @var SourceInterface
39
     */
40
    private $source;
41
42
    /**
43
     * @var ProcessorInterface
44
     */
45
    private $processor;
46
47
    /**
48
     * @var NamerInterface
49
     */
50
    private $namer;
51
52
    /**
53
     * @var RotatorInterface
54
     */
55
    private $preRotator;
56
57
    /**
58
     * @var DestinationInterface
59
     */
60
    private $destination;
61
62
    /**
63
     * @var RotatorInterface
64
     */
65
    private $postRotator;
66
67
    private $workflow;
68
69 26
    public function __construct(
70
        $name,
71
        SourceInterface $source,
72
        ProcessorInterface $processor,
73
        NamerInterface $namer,
74
        RotatorInterface $preRotator,
75
        DestinationInterface $destination,
76
        RotatorInterface $postRotator,
77
        WorkflowInterface $workflow
78
    ) {
79 26
        $this->name = $name;
80 26
        $this->source = $source;
81 26
        $this->processor = $processor;
82 26
        $this->namer = $namer;
83 26
        $this->preRotator = $preRotator;
84 26
        $this->destination = $destination;
85 26
        $this->postRotator = $postRotator;
86 26
        $this->workflow = $workflow;
87 26
    }
88
89
    /**
90
     * {@inheritdoc}
91
     */
92 12
    public function getName()
93
    {
94 12
        return $this->name;
95
    }
96
97
    /**
98
     * {@inheritdoc}
99
     */
100 8
    public function getSource()
101
    {
102 8
        return $this->source;
103
    }
104
105
    /**
106
     * {@inheritdoc}
107
     */
108 4
    public function getProcessor()
109
    {
110 4
        return $this->processor;
111
    }
112
113
    /**
114
     * {@inheritdoc}
115
     */
116 2
    public function getNamer()
117
    {
118 2
        return $this->namer;
119
    }
120
121
    /**
122
     * {@inheritdoc}
123
     */
124 4
    public function getPreRotator()
125
    {
126 4
        return $this->preRotator;
127
    }
128
129
    /**
130
     * {@inheritdoc}
131
     */
132 12
    public function getDestination()
133
    {
134 12
        return $this->destination;
135
    }
136
137
    /**
138
     * {@inheritdoc}
139
     */
140 4
    public function getPostRotator()
141
    {
142 4
        return $this->postRotator;
143
    }
144
145
    /**
146
     * {@inheritdoc}
147
     */
148 4
    public function getWorkflow()
149
    {
150 4
        return $this->workflow;
151
    }
152
}
153