Completed
Push — master ( ef610a...dc0762 )
by Gabor
24:45
created

FakeAction   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 5.6
6
 *
7
 * @copyright 2012 - 2016 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
namespace WebHemi\Middleware\Action;
13
14
use Psr\Http\Message\ResponseInterface;
15
use Psr\Http\Message\ServerRequestInterface;
16
use WebHemi\Middleware\MiddlewareInterface;
17
18
class FakeAction implements MiddlewareInterface
19
{
20
    public function __invoke(ServerRequestInterface &$request, ResponseInterface $response)
21
    {
22
        $request = $request->withAttribute('template', 'no')
23
            ->withAttribute('data', ['<h2>This is the test action, buddy!</h2>']);
24
25
        return $response;
26
    }
27
}
28