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.

anonymous()
last analyzed

Size

Total Lines 63
Code Lines 40

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 40
nc 2
nop 1
dl 0
loc 63
ccs 44
cts 44
cp 1
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
use Illuminate\Routing\Router;
4
5
$router->group(['as' => 'admin.', 'namespace' => 'SleepingOwl\Admin\Http\Controllers'], function (Router $router) {
6 285
    if (! $router->has('admin.dashboard')) {
7 285
        $router->get('', ['as' => 'dashboard', 'uses' => 'AdminController@getDashboard']);
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
8 285
    }
9
10 285
    $router->get('{adminModel}', [
11 285
        'as' => 'model',
12 285
        'uses' => 'AdminController@getDisplay',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
13 285
    ]);
14
15 285
    $router->post('{adminModel}', [
16 285
        'as' => 'model',
17 285
        'uses' => 'AdminController@inlineEdit',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
18 285
    ]);
19
20 285
    $router->get('{adminModel}/create', [
21 285
        'as' => 'model.create',
22 285
        'uses' => 'AdminController@getCreate',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
23 285
    ]);
24
25 285
    $router->post('{adminModel}/create', [
26 285
        'as' => 'model.store',
27 285
        'uses' => 'AdminController@postStore',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
28 285
    ]);
29
30 285
    $router->get('{adminModel}/{adminModelId?}/edit', [
31 285
        'as' => 'model.edit',
32 285
        'uses' => 'AdminController@getEdit',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
33 285
    ]);
34
35 285
    $router->post('{adminModel}/{adminModelId?}/edit', [
36 285
        'as' => 'model.update',
37 285
        'uses' => 'AdminController@postUpdate',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
38 285
    ]);
39
40 285
    $router->delete('{adminModel}/{adminModelId?}/delete', [
41 285
        'as' => 'model.delete',
42 285
        'uses' => 'AdminController@deleteDelete',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
43 285
    ]);
44
45 285
    $router->delete('{adminModel}/{adminModelId?}/destroy', [
46 285
        'as' => 'model.destroy',
47 285
        'uses' => 'AdminController@deleteDestroy',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
48 285
    ]);
49
50 285
    $router->post('{adminModel}/{adminModelId?}/restore', [
51 285
        'as' => 'model.restore',
52 285
        'uses' => 'AdminController@postRestore',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
53 285
    ]);
54
55 285
    $router->get('{adminWildcard}', [
56 285
        'as' => 'wildcard',
57 285
        'uses' => 'AdminController@getWildcard',
0 ignored issues
show
Bug introduced by
The controller App\Http\Controllers\Sle...rollers\AdminController does not seem to exist.

If there is a route defined but the controller class cannot be found there are two options: 1. the controller class needs to be implemented or 2. the route is outdated and can be removed.

If ?FooController? was found and ?BarController? is missing for the following example, either the controller should be implemented or the route should be removed:

$app->group(['as' => 'foo', 'prefix' => 'foo', 'namespace' => 'Foo'], function($app) {
    $app->group(['as' => 'foo', 'prefix' => 'foo'], function($app) {
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'FooController@getFoo']);
        $app->get('/all/{from}/{to}', ['as' => 'all', 'uses' => 'BarController@getBar']);
    });
});
Loading history...
58 285
    ]);
59 285
60
    $router->group(['middleware' => config('sleeping_owl.env_editor_middlewares')], function (Router $router) {
61
        $router->get(config('sleeping_owl.env_editor_url'), [
62
            'as' => 'env.editor',
63
            'uses' => 'AdminController@getEnvEditor',
64
        ]);
65
        $router->post(config('sleeping_owl.env_editor_url'), [
66
            'as' => 'env.editor.post',
67
            'uses' => 'AdminController@postEnvEditor',
68
        ]);
69
    });
70
});
71