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

DecodeControllerParametersSubscriber   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 14
rs 10
ccs 6
cts 6
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDecodeControllerParameters() 0 3 1
A onKernelController() 0 3 1
1
<?php
2
3
namespace Pgs\HashIdBundle\EventSubscriber;
4
5
use Pgs\HashIdBundle\Service\DecodeControllerParameters;
6
use Symfony\Component\HttpKernel\Event\ControllerEvent;
7
use Symfony\Component\HttpKernel\Event\KernelEvent;
8
9
class DecodeControllerParametersSubscriber extends AbstractDecodeControllerParametersSubscriber implements
10
    DecodeControllerParametersSubscriberInterface
11
{
12
    /**
13
     * @param KernelEvent|ControllerEvent $event
14 1
     */
15
    public function onKernelController(KernelEvent $event): void
16 1
    {
17 1
        $this->getDecodeControllerParameters()->decodeControllerParameters($event);
18
    }
19 1
20
    public function getDecodeControllerParameters(): DecodeControllerParameters
21 1
    {
22 1
        return $this->decodeControllerParameters;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->decodeControllerParameters returns the type Pgs\HashIdBundle\EventSu...tersSubscriberInterface which is incompatible with the type-hinted return Pgs\HashIdBundle\Service...odeControllerParameters.
Loading history...
23
    }
24
}
25