GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( f14ab3...3fc05b )
by Odiseo
05:44 queued 02:20
created

OrderSearchAction::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\SyliusReportPlugin\Controller\Action;
6
7
use FOS\RestBundle\View\View;
8
use FOS\RestBundle\View\ViewHandler;
9
use Odiseo\SyliusReportPlugin\Repository\OrderRepositoryInterface;
10
use Symfony\Component\HttpFoundation\Request;
11
use Symfony\Component\HttpFoundation\Response;
12
13
final class OrderSearchAction
14
{
15
    /** @var OrderRepositoryInterface */
16
    private $orderRepository;
17
18
    /** @var ViewHandler */
19
    private $viewHandler;
20
21
    public function __construct(OrderRepositoryInterface $productRepository, ViewHandler $viewHandler)
22
    {
23
        $this->orderRepository = $productRepository;
24
        $this->viewHandler = $viewHandler;
25
    }
26
27
    public function __invoke(Request $request): Response
28
    {
29
        $orders = $this->orderRepository->findByNumberPart($request->get('number', ''));
30
        $view = View::create($orders);
31
32
        $this->viewHandler->setExclusionStrategyGroups(['Autocomplete']);
33
        $view->getContext()->enableMaxDepth();
34
35
        return $this->viewHandler->handle($view);
36
    }
37
}
38