NotFound::process()   A
last analyzed

Complexity

Conditions 1
Paths 0

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 0
nop 2
crap 2
1
<?php
2
namespace Phrest\Middleware;
3
4
class NotFound implements \Interop\Http\ServerMiddleware\MiddlewareInterface
5
{
6
    public function process(\Psr\Http\Message\ServerRequestInterface $request, \Interop\Http\ServerMiddleware\DelegateInterface $delegate)
7
    {
8
        throw \Phrest\Http\Exception::NotFound(
9
            new \Phrest\API\Error(\Phrest\API\ErrorCodes::PATH_NOT_FOUND, 'path not found')
10
        );
11
    }
12
}