StatusController   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 14 4
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Models\Submission\SubmissionModel;
6
use App\Http\Controllers\Controller;
7
use Illuminate\Http\Request;
8
use Auth;
9
10
class StatusController extends Controller
11
{
12
    /**
13
     * Show the Status Page.
14
     *
15
     * @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...
16
     */
17
    public function index(Request $request)
18
    {
19
        $all_data=$request->all();
20
        $filter["pcode"]=isset($all_data["pcode"]) ? $all_data["pcode"] : null;
0 ignored issues
show
Comprehensibility Best Practice introduced by
$filter was never initialized. Although not strictly required by PHP, it is generally a good practice to add $filter = array(); before regardless.
Loading history...
21
        $filter["result"]=isset($all_data["result"]) ? $all_data["result"] : null;
22
        $filter["account"]=isset($all_data["account"]) ? $all_data["account"] : null;
23
        $submissionModel=new SubmissionModel();
24
        $records=$submissionModel->getRecord($filter);
25
        return view('status.index', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('status.inde..., 'filter' => $filter)) returns the type Illuminate\View\View which is incompatible with the documented return type App\Http\Controllers\Response.
Loading history...
26
            'page_title' => "Status",
27
            'site_title' => config("app.name"),
28
            'navigation' => "Status",
29
            'records' => $records,
30
            'filter' => $filter
31
        ]);
32
    }
33
}
34