Passed
Push — master ( eb791e...ac3f2d )
by John
05:21
created

RankController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 9 1
1
<?php
2
namespace App\Http\Controllers;
3
4
use App\Models\RankModel;
5
use App\Http\Controllers\Controller;
6
use Illuminate\Http\Request;
7
use Auth;
8
9
class RankController extends Controller
10
{
11
    /**
12
     * Show the Rank Page.
13
     *
14
     * @param Request $request your web request
15
     *
16
     * @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...
17
     */
18
    public function index(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

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

18
    public function index(/** @scrutinizer ignore-unused */ Request $request)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
    {
20
        $rankModel=new RankModel();
21
        $rankingList=$rankModel->list();
22
        return view('rank.index', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('rank.index'...List' => $rankingList)) returns the type Illuminate\View\View which is incompatible with the documented return type App\Http\Controllers\Response.
Loading history...
23
                'page_title'=>"Rank",
24
                'site_title'=>"NOJ",
25
                'navigation' => "Rank",
26
                'rankingList' => $rankingList
27
            ]);
28
    }
29
}
30