Completed
Push — master ( 78d676...37f2ba )
by Oliver
06:38
created

SingleProcessDetector::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Metabor\Statemachine\Factory;
4
5
use MetaborStd\Statemachine\Factory\ProcessDetectorInterface;
6
use MetaborStd\Statemachine\ProcessInterface;
7
8
/**
9
 * @author otischlinger
10
 */
11
class SingleProcessDetector implements ProcessDetectorInterface
12
{
13
    /**
14
     * @var ProcessInterface
15
     */
16
    private $process;
17
18
    /**
19
     * SingleProcessDetector constructor.
20
     * @param ProcessInterface $process
21
     */
22
    public function __construct(ProcessInterface $process)
23
    {
24
        $this->process = $process;
25
    }
26
27
    /**
28
     * @param object $subject
29
     * @return ProcessInterface
30
     */
31
    public function detectProcess($subject)
32
    {
33
        return $this->process;
34
    }
35
}
36