Completed
Push — master ( a40390...c25130 )
by
11s
created

AbstractWorkflow   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the LineMob package.
5
 *
6
 * (c) Ishmael Doss <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace LineMob\Core\Workflow;
13
14
/**
15
 * @author Bonn <[email protected]>
16
 */
17
abstract class AbstractWorkflow
18
{
19
    /**
20
     * @var WorkflowRegistryInterface
21
     */
22
    protected $registry;
23
24
    /**
25
     * @param WorkflowRegistryInterface $registry
26
     */
27
    public function __construct(WorkflowRegistryInterface $registry)
28
    {
29
        $registry->register($this->getConfig());
30
        $this->registry = $registry;
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    abstract protected function getConfig();
37
}
38