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

FakeAction::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
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