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

WorkflowFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 1 1
A build() 0 11 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 Psr\Log\LoggerInterface;
16
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
17
18
final class WorkflowFactory
19
{
20
    private function __construct() { }
21
22
    /**
23
     * Builds default workflow.
24
     *
25
     * @param EventDispatcherInterface $eventDispatcher
26
     * @param LoggerInterface $logger
27
     * @return Workflow
28
     */
29 6
    public static function build(EventDispatcherInterface $eventDispatcher, LoggerInterface $logger)
30
    {
31 6
        return new Workflow($eventDispatcher, $logger, array(
32 6
            new Fetch(),
33 6
            new Process(),
34 6
            new Name(),
35 6
            new PreRotate(),
36 6
            new Push(),
37 6
            new PostRotate()
38 3
        ));
39
    }
40
}
41