Passed
Push — master ( c734d9...025b20 )
by Mike
03:31
created

ExceptionHandlerFacade::handleException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\ExceptionHandler\Business;
6
7
use Xervice\Core\Business\Model\Facade\AbstractFacade;
8
9
/**
10
 * @method \Xervice\ExceptionHandler\Business\ExceptionHandlerBusinessFactory getFactory()
11
 * @method \Xervice\ExceptionHandler\ExceptionHandlerConfig getConfig()
12
 */
13
class ExceptionHandlerFacade extends AbstractFacade
14
{
15
    /**
16
     * @param \Exception $exception
17
     */
18 1
    public function handleException(\Throwable $exception): void
19
    {
20 1
        $this->getFactory()->createExceptionHandler()->handleException($exception);
21 1
    }
22
23 1
    public function registerExceptionHandler(): void
24
    {
25 1
        $this->getFactory()->createExceptionRegistrar()->register();
26
    }
27
}