Passed
Push — master ( 8cc9a0...f951ba )
by karam
06:13 queued 03:49
created

getChildMiddleware()   A

Complexity

Conditions 4
Paths 6

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 4
eloc 7
c 1
b 1
f 0
nc 6
nop 0
dl 0
loc 11
rs 10
1
<?php
2
3
use Illuminate\Support\Facades\Route;
1 ignored issue
show
Bug introduced by
The type Illuminate\Support\Facades\Route 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...
4
use KMLaravel\ApiGenerator\Facade\KMFunctionsFacade;
5
6
Route::namespace("KMLaravel\ApiGenerator\Controllers")
7
    ->group(function () {
8
        // this is pull middleware information from apis_generator.php config file
9
        Route::group(['middleware' => array_merge(['web'], KMFunctionsFacade::getMiddleware())], function () {
0 ignored issues
show
Bug introduced by
KMLaravel\ApiGenerator\F...Facade::getMiddleware() of type KMLaravel\ApiGenerator\Helpers\KMFunctions is incompatible with the type array|null expected by parameter $array2 of array_merge(). ( Ignorable by Annotation )

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

9
        Route::group(['middleware' => array_merge(['web'], /** @scrutinizer ignore-type */ KMFunctionsFacade::getMiddleware())], function () {
Loading history...
10
            Route::group([], function () {
11
                // all apis table page
12
                Route::get('/apis-generator/index', function () {
13
                    return view('ApisGenerator/index');
1 ignored issue
show
Bug introduced by
The function view was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

13
                    return /** @scrutinizer ignore-call */ view('ApisGenerator/index');
Loading history...
14
                })->name('apisGenerator.index');
15
                // create new api page
16
                Route::get('/apis-generator/create', function () {
17
                    return view('ApisGenerator/create');
1 ignored issue
show
Bug introduced by
The function view was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

17
                    return /** @scrutinizer ignore-call */ view('ApisGenerator/create');
Loading history...
18
                })->name('apisGenerator.create');
19
                // post information route
20
                Route::post('/apis-generator/create', "ApisGeneratorController@create")
21
                    ->name('apisGenerator.create.send');
22
            });
23
        });
24
    });
25
26