Completed
Push — master ( 99fd04...6a3a72 )
by Jakub
02:38
created

MockCommandExtractor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A extractFromRequest() 0 4 1
A willReturn() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Eps\Req2CmdBundle\CommandExtractor;
5
6
use Symfony\Component\HttpFoundation\Request;
7
8
class MockCommandExtractor implements CommandExtractorInterface
9
{
10
    private $toReturn;
11
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function extractFromRequest(Request $request, string $cmdClassName)
16
    {
17
        return $this->toReturn;
18
    }
19
20
    public function willReturn($command): void
21
    {
22
        $this->toReturn = $command;
23
    }
24
}
25