Passed
Push — master ( 62a61a...c49d39 )
by Chubarov
05:18
created

HomeController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace agoalofalife\postman\Http\Controllers;
3
4
use Illuminate\View\View;
5
6
class HomeController
7
{
8 2
    public function __construct()
9
    {
10 2
        if (class_exists(config('postman.middleware'))) {
11 1
            $this->middleware(config('postman.middleware'));
0 ignored issues
show
Bug introduced by
The method middleware() does not exist on agoalofalife\postman\Htt...trollers\HomeController. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

11
            $this->/** @scrutinizer ignore-call */ 
12
                   middleware(config('postman.middleware'));

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
12
        }
13 1
    }
14
15 1
    public function index() : View
16
    {
17 1
        return view('postman::app');
18
    }
19
}