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

WorkflowFactory::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

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