DebugHandler::handle()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 6
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Service\Handler\Handler;
6
7
8
use Symfony\Component\Debug\Debug;
9
use Xervice\Service\Handler\HandlerInterface;
10
11
class DebugHandler implements HandlerInterface
12
{
13
    /**
14
     * @param bool $isDebug
15
     */
16
    public function handle(bool $isDebug): void
17
    {
18
        if ($isDebug) {
19
            putenv("APP_DEBUG=true");
20
            Debug::enable();
21
        }
22
    }
23
24
}