SearchController::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 1
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Http\Controllers\Controller;
6
use Illuminate\Http\Request;
7
8
class SearchController extends Controller
9
{
10
    /**
11
     * Show the Status Page.
12
     *
13
     * @return Response
0 ignored issues
show
Bug introduced by
The type App\Http\Controllers\Response was not found. Did you mean Response? If so, make sure to prefix the type with \.
Loading history...
14
     */
15
    public function __invoke(Request $request)
16
    {
17
        return view('search.index', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('search.inde...est->input('page', 1))) returns the type Illuminate\View\View which is incompatible with the documented return type App\Http\Controllers\Response.
Loading history...
18
            'page_title' => "Search",
19
            'site_title' => config("app.name"),
20
            'navigation' => null,
21
            'search_key' => $request->input('q'),
22
            'search_category' => $request->input('tab', 'problems'),
23
            'page' => $request->input('page', 1)
24
        ]);
25
    }
26
}
27