Passed
Push — master ( 713f8f...96a84a )
by
unknown
18:54 queued 12:11
created

ChangePositionPaymentMethodAction::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * You can find more information about us on https://bitbag.io and write us
7
 * an email on [email protected].
8
 */
9
10
declare(strict_types=1);
11
12
namespace BitBag\SyliusMolliePlugin\Controller\Action\Admin;
13
14
use BitBag\SyliusMolliePlugin\Creator\ChangePositionPaymentMethodCreatorInterface;
15
use Symfony\Component\HttpFoundation\Request;
16
use Symfony\Component\HttpFoundation\Response;
17
18
final class ChangePositionPaymentMethodAction
19
{
20
    /** @var ChangePositionPaymentMethodCreatorInterface */
21
    private $changePositionPaymentMethodCreator;
22
23
    public function __construct(ChangePositionPaymentMethodCreatorInterface $changePositionPaymentMethodCreator)
24
    {
25
        $this->changePositionPaymentMethodCreator = $changePositionPaymentMethodCreator;
26
    }
27
28
    public function __invoke(Request $request): Response
29
    {
30
        $this->changePositionPaymentMethodCreator->createFromRequest($request);
31
32
        return new Response('OK');
33
    }
34
}
35