Completed
Push — master ( 632840...f0c648 )
by Alexander
02:14
created

MockThrowableRenderer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A render() 0 3 1
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