Completed
Push — develop ( aab709...2637a1 )
by Tino
06:10
created

OnOutputPageExceptionListener::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Copyright (c) by the ACP3 Developers.
5
 * See the LICENSE file at the top-level module directory for licensing details.
6
 */
7
8
namespace ACP3\Core\Application\Event\Listener;
9
10
use ACP3\Core\Application\Event\OutputPageExceptionEvent;
11
use Psr\Log\LoggerInterface;
12
13
class OnOutputPageExceptionListener
14
{
15
    /**
16
     * @var \Psr\Log\LoggerInterface
17
     */
18
    private $logger;
19
20
    public function __construct(LoggerInterface $logger)
21
    {
22
        $this->logger = $logger;
23
    }
24
25
    public function __invoke(OutputPageExceptionEvent $event): void
26
    {
27
        $this->logger->error($event->getThrowable());
28
    }
29
}
30