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

Issues (184)

app/Helpers/Global.php (3 issues)

1
<?php
2
3
    /**
4
     * Return the auth account instance class.
5
     *
6
     * @return \App\Model\Account|\Illuminate\Contracts\Auth\Authenticatable
7
     */
8
    function account()
9
    {
10
        return auth()->user();
11
    }
12
13
    /**
14
     * Return the webshelf framework version.
15
     *
16
     * @return App\Framework
17
     */
18
    function framework()
19
    {
20
        return app(App\Framework::class);
21
    }
22
23
    /**
24
     * @return \App\Classes\SettingsManager
25
     */
26
    function settings()
27
    {
28
        return app(\App\Classes\SettingsManager::class);
29
    }
30
31
    /**
32
     * @return \App\Classes\PluginManager
33
     */
34
    function plugins()
35
    {
36
        return app(\App\Classes\PluginManager::class);
37
    }
38
39
    /**
40
     * @return \App\Classes\Library\StyleCSS\Style
41
     */
42
    function css()
43
    {
44
        return app(\App\Classes\Library\StyleCSS\Style::class);
45
    }
46
47
    /**
48
     * Returned the morphed model.
49
     *
50
     * @param string $table
51
     * @param int $id
52
     * @return App\Classes\Interfaces\Linkable
53
     */
54
    function getMorphedModel(string $table, int $id)
55
    {
56
        return app($table)->whereKey($id)->first();
0 ignored issues
show
The method whereKey() does not exist on Illuminate\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

56
        return app($table)->/** @scrutinizer ignore-call */ whereKey($id)->first();

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...
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    function currentURI()
63
    {
64
        $route = basename(request()->path()) ?: 'index';
65
66
        return $route != '' ? $route : 'index';
67
    }
68
69
    /**
70
     * Return an array of the segmented url path.
71
     *
72
     * @return array
73
     */
74
    function segmentRequestPath()
75
    {
76
        $path = app('request')->path();
77
78
        if ($path == '/') {
79
            return ['index'];
80
        }
81
82
        return explode('/', $path);
83
    }
84
85
    /**
86
     * Turn a boolean value into readable data.
87
     * true  = Active
88
     * false = Inactive.
89
     *
90
     * @param $boolean
91
     * @param null $trueMessage
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $falseMessage is correct as it would always require null to be passed?
Loading history...
Documentation Bug introduced by
Are you sure the doc-type for parameter $trueMessage is correct as it would always require null to be passed?
Loading history...
92
     * @param null $falseMessage
93
     * @return string
94
     * @internal param null $true
95
     * @internal param null $false
96
     * @deprecated
97
     */
98
    function bool2Status($boolean, $trueMessage = null, $falseMessage = null)
99
    {
100
        if ($boolean == true) {
101
            return '<span class="status green">'.($trueMessage ?: 'Active').'</span>';
102
        } else {
103
            return '<span class="status red">'.($falseMessage ?: 'Inactive').'</span>';
104
        }
105
    }
106