Passed
Push — master ( b6a195...1e79f7 )
by mcfog
03:21
created

NoopMiddleware::main()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lit\Nimo\Middlewares;
6
7
use Psr\Http\Message\ResponseInterface;
8
9
final class NoopMiddleware extends AbstractMiddleware
10
{
11 1
    public static function instance()
12
    {
13 1
        static $instance;
14 1
        if (!isset($instance)) {
15 1
            $instance = new self();
16
        }
17 1
        return $instance;
18
    }
19
20 2
    protected function main(): ResponseInterface
21
    {
22 2
        return $this->delegate();
23
    }
24
}
25