Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
NullErrorReporter
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 report
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5/**
6 * This file is part of fast-forward/defer.
7 *
8 * This source file is subject to the license bundled
9 * with this source code in the file LICENSE.
10 *
11 * @copyright Copyright (c) 2026 Felipe SayĆ£o Lobato Abreu <github@mentordosnerds.com>
12 * @license   https://opensource.org/licenses/MIT MIT License
13 *
14 * @see       https://github.com/php-fast-forward/defer
15 * @see       https://github.com/php-fast-forward
16 * @see       https://datatracker.ietf.org/doc/html/rfc2119
17 */
18
19namespace FastForward\Defer\ErrorReporter;
20
21use Throwable;
22use FastForward\Defer\ErrorReporterInterface;
23
24/**
25 * This error reporter implementation MUST ignore all reported exceptions.
26 * It SHALL NOT perform any logging or throw exceptions under any circumstances.
27 * This class MAY be used as a default or placeholder reporter.
28 */
29final class NullErrorReporter implements ErrorReporterInterface
30{
31    /**
32     * Ignores any reported throwable.
33     *
34     * This method MUST NOT perform any action and MUST NOT throw exceptions.
35     *
36     * @param Throwable $throwable the exception or error to ignore
37     * @param callable|null $callback the related callback, if available
38     * @param array $args arguments passed to the callback, if any
39     *
40     * @return void
41     */
42    public function report(Throwable $throwable, ?callable $callback = null, array $args = []): void {}
43}