Passed
Pull Request — master (#257)
by Wilmer
28:13 queued 13:12
created

MockThrowableRenderer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 20
rs 10
wmc 3
1
<?php
2
3
4
namespace Yiisoft\Yii\Web\Tests\Middleware\Mock;
5
6
use Yiisoft\Yii\Web\ErrorHandler\ThrowableRenderer;
7
8
class MockThrowableRenderer extends ThrowableRenderer
9
{
10
    /**
11
     * @var string
12
     */
13
    private $response;
14
15
    public function __construct(string $response)
16
    {
17
        $this->response = $response;
18
    }
19
20
    public function render(\Throwable $t): string
21
    {
22
        return $this->response;
23
    }
24
25
    public function renderVerbose(\Throwable $t): string
26
    {
27
        return $this->response;
28
    }
29
}
30