Completed
Pull Request — master (#331)
by Elan
02:10 queued 57s
created

RenderMiddleware::call()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace XHGui\Middleware;
4
5
use Slim\Middleware;
6
7
class RenderMiddleware extends Middleware
8
{
9
    public function call()
10
    {
11
        $app = $this->app;
12
13
        // Run the controller action/route function
14
        $this->next->call();
15
16
        // Render the template.
17
        if (isset($app->controller)) {
18
            $app->controller->render();
19
        }
20
    }
21
}
22