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

ChangePositionPaymentMethodAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 5 1
A __construct() 0 3 1
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