PaymentMethodController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPaymentGatewaysAction() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PH\Bundle\CoreBundle\Controller;
6
7
use FOS\RestBundle\View\View;
8
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
9
use Symfony\Component\HttpFoundation\Request;
10
use Symfony\Component\HttpFoundation\Response;
11
12
/**
13
 * @author Mateusz Zalewski <[email protected]>
14
 */
15
class PaymentMethodController extends ResourceController
16
{
17
    /**
18
     * @param Request $request
19
     *
20
     * @return Response
21
     */
22
    public function getPaymentGatewaysAction(Request $request)
23
    {
24
        $configuration = $this->requestConfigurationFactory->create($this->metadata, $request);
25
26
        return $this->viewHandler->handle($configuration, View::create($this->getParameter('sylius.gateway_factories')));
27
    }
28
}
29