Completed
Push — master ( b268cf...c6aad7 )
by Oliver
07:45
created

SingleProcessDetector   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 25
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A detectProcess() 0 4 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