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

MockCommandExtractor::extractFromRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 2
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