GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ExceptionHandlerDelegate::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace predaddy\messagehandling\interceptors;
4
5
use Exception;
6
use predaddy\messagehandling\SubscriberExceptionContext;
7
use predaddy\messagehandling\SubscriberExceptionHandler;
8
9
/**
10
 * Delegates all incoming errors to the registered handlers.
11
 *
12
 * @package predaddy\messagehandling\interceptors
13
 * @author Janos Szurovecz <[email protected]>
14
 */
15
final class ExceptionHandlerDelegate implements SubscriberExceptionHandler
16
{
17
    /**
18
     * @var SubscriberExceptionHandler[]
19
     */
20
    private $handlers;
21
22
    /**
23
     * @param SubscriberExceptionHandler[] $handlers
24
     */
25
    public function __construct(array $handlers = [])
26
    {
27
        $this->handlers = $handlers;
28
    }
29
30
    public function handleException(Exception $exception, SubscriberExceptionContext $context)
31
    {
32
        foreach ($this->handlers as $handler) {
33
            $handler->handleException($exception, $context);
34
        }
35
    }
36
}
37