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.
Completed
Push — master ( 8c82e7...44f2dc )
by Nikhil
09:16
created

app/Http/Controllers/MakeController.php (2 issues)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Events\MakeWasCreated;
6
use App\Events\MakeWasDeleted;
7
use App\Make;
8
use Illuminate\Http\Request;
9
10
class MakeController extends Controller
11
{
12
    /**
13
     * MakeController constructor.
14
     */
15 7
    public function __construct()
16
    {
17 7
        $this->middleware('auth');
18 7
    }
19
20
    /**
21
     * Display a listing of the resource.
22
     *
23
     * @return \Illuminate\Http\Response
24
     */
25 1
    public function index()
26
    {
27 1
        return view('makes.index');
28
    }
29
30
    /**
31
     * Store a newly created resource in storage.
32
     *
33
     * @param  \Illuminate\Http\Request $request
34
     */
35 2
    public function store(Request $request)
36
    {
37 2
        $this->validate($request, [
38
            'name' => 'required|string|max:255'
39 2
        ]);
40
41 1
        $make = Make::create($request->only(['name']));
42 1
        event(new MakeWasCreated($make));
0 ignored issues
show
The call to MakeWasCreated::__construct() has too many arguments starting with $make.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
43 1
    }
44
45
    /**
46
     * Remove the specified resource from storage.
47
     *
48
     * @param  int $id
49
     */
50 1
    public function destroy($id)
51
    {
52 1
        $make = Make::findOrFail($id);
53 1
        $make->delete();
54 1
        event(new MakeWasDeleted($make));
0 ignored issues
show
The call to MakeWasDeleted::__construct() has too many arguments starting with $make.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
55 1
    }
56
}
57