Completed
Push — master ( c5e677...4df15a )
by Sebastian
02:56
created

Process   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 41
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
run() 0 1 ?
1
<?php
2
namespace phpbu\App\Runner;
3
4
use phpbu\App\Configuration;
5
use phpbu\App\Result;
6
use phpbu\App\Factory;
7
8
/**
9
 * Runner base class.
10
 *
11
 * @package    phpbu
12
 * @subpackage Backup
13
 * @author     Sebastian Feldmann <[email protected]>
14
 * @copyright  Sebastian Feldmann <[email protected]>
15
 * @license    https://opensource.org/licenses/MIT The MIT License (MIT)
16
 * @link       https://phpbu.de/
17
 * @since      Class available since Release 5.1.0
18
 */
19
abstract class Process
20
{
21
    /**
22
     * @var \phpbu\App\Factory
23
     */
24
    protected $factory;
25
26
    /**
27
     * phpbu Result
28
     *
29
     * @var \phpbu\App\Result
30
     */
31
    protected $result;
32
33
    /**
34
     * phpbu Configuration
35
     *
36
     * @var \phpbu\App\Configuration
37
     */
38
    protected $configuration;
39
40
    /**
41
     * Backup constructor.
42
     *
43
     * @param \phpbu\App\Factory $factory
44
     * @param \phpbu\App\Result  $result
45
     */
46 13
    public function __construct(Factory $factory, Result $result)
47
    {
48 13
        $this->factory = $factory;
49 13
        $this->result  = $result;
50 13
    }
51
52
    /**
53
     * Execution blueprint.
54
     *
55
     * @param  \phpbu\App\Configuration $configuration
56
     * @return \phpbu\App\Result
57
     */
58
    abstract public function run(Configuration $configuration) : Result;
59
}
60