DisableJSAggregationAction   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 19
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOverrides() 0 4 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\DisableJSAggregation;
15
16
use Ekino\Drupal\Debug\Action\AbstractOverrideConfigAction;
17
use Ekino\Drupal\Debug\Kernel\Event\DebugKernelEvents;
18
19
class DisableJSAggregationAction extends AbstractOverrideConfigAction
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24 1
    public static function getSubscribedEvents(): array
25
    {
26
        return array(
27 1
            DebugKernelEvents::AFTER_SETTINGS_INITIALIZATION => 'process',
28
        );
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    protected function getOverrides(): array
35
    {
36
        return array(
37
          '[system.performance][js][preprocess]' => false,
38
        );
39
    }
40
}
41