ProvideKernelProcessor::process()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 10
c 2
b 0
f 0
1
<?php
2
3
/*
4
 *  This file is part of the Micro framework package.
5
 *
6
 *  (c) Stanislau Komar <[email protected]>
7
 *
8
 *  For the full copyright and license information, please view the LICENSE
9
 *  file that was distributed with this source code.
10
 */
11
12
namespace Micro\Kernel\App\Business\Processor;
13
14
use Micro\Framework\Kernel\KernelInterface;
15
use Micro\Kernel\App\AppKernelInterface;
16
use Micro\Kernel\App\Business\KernelActionProcessorInterface;
17
18
class ProvideKernelProcessor implements KernelActionProcessorInterface
19
{
20 8
    public function process(AppKernelInterface $appKernel): void
21
    {
22 8
        $callback = fn (): KernelInterface => $appKernel;
23
24 8
        $appKernel->container()->register(AppKernelInterface::class, $callback);
25 8
        $appKernel->container()->register(KernelInterface::class, $callback);
26
    }
27
}
28