Completed
Push — dev-master ( 710732...009af4 )
by Karol
03:53 queued 10s
created

DecodeControllerParameters::processRequestParametersWithParamConverter()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Pgs\HashIdBundle\Service;
6
7
use Symfony\Component\HttpKernel\Event\ControllerEvent;
8
9
class DecodeControllerParameters extends AbstractDecodeControllerParameters
10
{
11
    public function decodeControllerParameters(ControllerEvent $event): void
12
    {
13
        $controller = $event->getController();
14
        $parametersProcessor = $this
0 ignored issues
show
Bug introduced by
The call to Pgs\HashIdBundle\Paramet...deParametersProcessor() has too few arguments starting with method. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
            ->/** @scrutinizer ignore-call */ createControllerDecodeParametersProcessor(...$controller);

This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
15
            ->getParametersProcessorFactory()
16
            ->createControllerDecodeParametersProcessor(...$controller);
17
18 2
        $this->processRequestParameters($event, $parametersProcessor);
19
        $this->processRequestParametersWithParamConverter($event);
20 2
    }
21
}
22