Completed
Push — master ( 44580f...28ceb5 )
by Mathieu
01:44
created

CheckMaintenance::call()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
namespace Suricate\Middleware;
3
4
class CheckMaintenance implements \Suricate\Interfaces\IMiddleware
5
{
6
    public function call(&$response)
7
    {
8
        if (app()->inMaintenance()) {
9
            app()->abort(503, 'Maintenance in progress');
10
        }
11
    }
12
}
13