Completed
Push — master ( 8a7993...1a063d )
by Nikola
05:00
created

WorkflowFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Test Coverage

Coverage 0%

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 0
cts 11
cp 0
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
    public static function build(EventDispatcherInterface $eventDispatcher, LoggerInterface $logger)
30
    {
31
        return new Workflow($eventDispatcher, $logger, array(
32
            new Fetch(),
33
            new Process(),
34
            new Name(),
35
            new PreRotate(),
36
            new Push(),
37
            new PostRotate()
38
        ));
39
    }
40
}