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.

EventController::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Http\Controllers\Tabbar\Navigation\Contents\It;
4
5
use App\Http\Controllers\Controller;
6
use App\Http\Services\Contents\It\Event\ConnpassEventService;
7
use Illuminate\Http\Request;
8
9
/**
10
 * EventController.
11
 * 
12
 * contentsタブ内で表示するコンテンツとして
13
 * ITのEventのコンテンツを扱う
14
 */
15
class EventController extends Controller
16
{
17
    /**
18
     * Create a new event controller instance.
19
     */
20
    public function __construct()
21
    {
22
    }
23
24
    /**
25
     * topアクション.
26
     *
27
     * @return view contents/it/event_topテンプレート
28
     */
29
    public function topAction()
30
    {
31
        return view('tabbar/navigation/contents/contents_top');
32
    }
33
34
    /**
35
     * connpassアクション.
36
     *
37
     * @return view contents/it/event/connpassテンプレート
38
     */
39
    public function connpassAction(Request $request)
40
    {
41
        $connpassEventEvent = new ConnpassEventService();
42
        $month = $connpassEventEvent->getMonth($request);
0 ignored issues
show
Documentation introduced by
$request is of type object<Illuminate\Http\Request>, but the function expects a array.

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...
43
        $year = $connpassEventEvent->getYear($request);
0 ignored issues
show
Documentation introduced by
$request is of type object<Illuminate\Http\Request>, but the function expects a array.

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...
44
        return view(
45
            'tabbar/navigation/contents/it/event/connpass',
46
            compact('month','year')
47
        );
48
    }
49
50
    /**
51
     * connpassアクション.
52
     *
53
     * @return view contents/it/event/connpass_listテンプレート
54
     */
55
    public function connpassListAction()
56
    {
57
        return view('tabbar/navigation/contents/it/event/connpass_list');
58
    }
59
}
60