GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

TabbarController::tabbarAction()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 14
rs 9.4285
cc 2
eloc 7
nc 2
nop 1
1
<?php
2
3
namespace App\Http\Controllers\Tabbar;
4
5
use App\Http\Controllers\Controller;
6
use Illuminate\Http\Request;
7
use App\Http\Services\Tabbar\TabbarService;
8
9
/**
10
 * TabbarController.
11
 * 
12
 * ページの下に表示しているタブバーを扱う
13
 */
14
class TabbarController extends Controller
15
{
16
    /**
17
     * Create a new tabbar controller instance.
18
     */
19
    public function __construct()
20
    {
21
    }
22
23
    /**
24
     * tabbarアクション.
25
     *
26
     * @return view tabbar/tabbarテンプレート
27
     */
28
    public function tabbarAction(Request $request)
29
    {
30
        $tabbarInfo = (new TabbarService())->getTabbarInfo($request);
0 ignored issues
show
Documentation introduced by
$request is of type object<Illuminate\Http\Request>, but the function expects a object<App\Http\Services....

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
31
        // タブバーの状態はデフォルトでhome
32
        $tabbarStatus = 'home';
33
        // リクエストにタブバーの状態がある場合
34
        if (isset($request['tabbarstatus'])) {
35
            $tabbarStatus = $request['tabbarstatus'];
36
        }
37
        // リクエストパラメータを取得する
38
        $requestParams = $request->getQueryString();
39
40
        return view('tabbar/tabbar', compact('tabbarInfo', 'tabbarStatus', 'requestParams'));
41
    }
42
}
43