Completed
Pull Request — master (#456)
by Alejandro
14:16
created

EmptyResponseImplicitOptionsMiddlewareFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Rest\Middleware;
5
6
use Zend\Diactoros\Response\EmptyResponse;
7
use Zend\Expressive\Router\Middleware\ImplicitOptionsMiddleware;
8
9
class EmptyResponseImplicitOptionsMiddlewareFactory
10
{
11
    public function __invoke()
12
    {
13
        return new ImplicitOptionsMiddleware(function () {
14
            return new EmptyResponse();
15
        });
16
    }
17
}
18