Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class SessionDependencyProvider extends AbstractDependencyProvider |
||
12 | { |
||
13 | public const SESSION_HANDLER = 'session.handler'; |
||
14 | |||
15 | /** |
||
16 | * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container |
||
17 | * |
||
18 | * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface |
||
19 | */ |
||
20 | 1 | public function handleDependencies(DependencyContainerInterface $container): DependencyContainerInterface |
|
21 | { |
||
22 | 1 | $container = $this->addSessionHandler($container); |
|
23 | |||
24 | 1 | return $container; |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return \SessionHandlerInterface |
||
29 | * @throws \RuntimeException |
||
30 | * @throws \InvalidArgumentException |
||
31 | */ |
||
32 | 1 | protected function getSessionHandler(DependencyContainerInterface $container): \SessionHandlerInterface |
|
|
|||
33 | { |
||
34 | 1 | return new NativeFileSessionHandler(); |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container |
||
39 | * |
||
40 | * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface |
||
41 | */ |
||
42 | 1 | protected function addSessionHandler( |
|
49 | } |
||
50 | |||
51 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.