Passed
Pull Request — master (#25)
by Evgeniy
02:13
created

PlainTextRenderer::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\ErrorHandler\Renderer;
6
7
use Psr\Http\Message\ServerRequestInterface;
8
use Throwable;
9
use Yiisoft\ErrorHandler\ThrowableRenderer;
10
11
/**
12
 * Formats exception into plain text string.
13
 */
14
final class PlainTextRenderer extends ThrowableRenderer
15
{
16
    public function render(Throwable $t, ServerRequestInterface $request = null): string
17
    {
18
        return 'An internal server error occurred';
19
    }
20
21 10
    public function renderVerbose(Throwable $t, ServerRequestInterface $request = null): string
22
    {
23 10
        return $this->convertThrowableToVerboseString($t);
24
    }
25
}
26