Completed
Push — master ( f4be61...d5c601 )
by Nikola
08:05
created

WhoopsRunner   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 27
ccs 6
cts 12
cp 0.5
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A pushHandler() 0 4 1
A register() 0 4 1
A unregister() 0 4 1
1
<?php
2
/**
3
 * This file is part of the Phoundation package.
4
 *
5
 * Copyright (c) Nikola Posa
6
 *
7
 * For full copyright and license information, please refer to the LICENSE file,
8
 * located at the package root folder.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Phoundation\ErrorHandling;
14
15
use Whoops\Run;
16
17
/**
18
 * @author Nikola Posa <[email protected]>
19
 */
20
final class WhoopsRunner implements RunnerInterface
21
{
22
    /**
23
     * @var Run
24
     */
25
    private $whoops;
26
27 1
    public function __construct(Run $whoops)
28
    {
29 1
        $this->whoops = $whoops;
30 1
    }
31
32 1
    public function pushHandler(callable $handler)
33
    {
34 1
        $this->whoops->pushHandler($handler);
35 1
    }
36
37
    public function register()
38
    {
39
        $this->whoops->register();
40
    }
41
42
    public function unregister()
43
    {
44
        $this->whoops->unregister();
45
    }
46
}
47