Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Pull Request — master (#3836)
by
unknown
10:59
created

AdminController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 54
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A dashboard() 0 9 1
A redirect() 0 4 1
A errorFrame() 0 10 1
A __construct() 0 3 1
1
<?php
2
3
namespace Backpack\CRUD\app\Http\Controllers;
4
5
use Facade\FlareClient\Flare;
0 ignored issues
show
Bug introduced by
The type Facade\FlareClient\Flare was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Facade\Ignition\ErrorPage\ErrorPageHandler;
0 ignored issues
show
Bug introduced by
The type Facade\Ignition\ErrorPage\ErrorPageHandler was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Illuminate\Http\Request;
8
use Illuminate\Routing\Controller;
9
10
class AdminController extends Controller
11
{
12
    protected $data = []; // the information we send to the view
13
14
    /**
15
     * Create a new controller instance.
16
     */
17
    public function __construct()
18
    {
19
        $this->middleware(backpack_middleware());
20
    }
21
22
    /**
23
     * Show the admin dashboard.
24
     *
25
     * @return \Illuminate\Http\Response
26
     */
27
    public function dashboard()
28
    {
29
        $this->data['title'] = trans('backpack::base.dashboard'); // set the page title
30
        $this->data['breadcrumbs'] = [
31
            trans('backpack::crud.admin')     => backpack_url('dashboard'),
32
            trans('backpack::base.dashboard') => false,
33
        ];
34
35
        return view(backpack_view('dashboard'), $this->data);
0 ignored issues
show
Bug Best Practice introduced by
The expression return view(backpack_vie...shboard'), $this->data) returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
36
    }
37
38
    /**
39
     * Redirect to the dashboard.
40
     *
41
     * @return \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse
42
     */
43
    public function redirect()
44
    {
45
        // The '/admin' route is not to be used as a page, because it breaks the menu's active state.
46
        return redirect(backpack_url('dashboard'));
47
    }
48
49
    /**
50
     * Show the error.
51
     *
52
     * @return \Illuminate\Http\Response
53
     */
54
    public function errorFrame(Request $request)
55
    {
56
        $handler = app(ErrorPageHandler::class);
57
        $client = app()->make(Flare::class);
58
59
        $exception = new $request->exception($request->message, 0, 1, $request->file, $request->line);
60
61
        $report = $client->createReport($exception);
62
63
        $handler->handleReport($report);
0 ignored issues
show
Bug introduced by
The method handleReport() does not exist on Illuminate\Contracts\Foundation\Application. ( Ignorable by Annotation )

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

63
        $handler->/** @scrutinizer ignore-call */ 
64
                  handleReport($report);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
64
    }
65
}
66