Completed
Push — master ( 7c9eb0...a92430 )
by Thomas
13s
created

EnableDebugClassLoaderAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A process() 0 3 1
A getSubscribedEvents() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the ekino Drupal Debug project.
7
 *
8
 * (c) ekino
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Ekino\Drupal\Debug\Action\EnableDebugClassLoader;
15
16
use Ekino\Drupal\Debug\Action\EventSubscriberActionInterface;
17
use Ekino\Drupal\Debug\Kernel\Event\DebugKernelEvents;
18
use Symfony\Component\Debug\DebugClassLoader;
19
20
class EnableDebugClassLoaderAction implements EventSubscriberActionInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25 1
    public static function getSubscribedEvents(): array
26
    {
27
        return array(
28 1
            DebugKernelEvents::ON_KERNEL_INSTANTIATION => 'process',
29
        );
30
    }
31
32 1
    public function process(): void
33
    {
34 1
        DebugClassLoader::enable();
35 1
    }
36
}
37