Issues (15)

src/Routes/Routes.php (1 issue)

Labels
Severity
1
<?php
2
3
use Illuminate\Support\Facades\Route;
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
It seems like KMLaravel\ApiGenerator\F...Middleware() ?? array() can also be of type KMLaravel\ApiGenerator\Helpers\KMFunctions; however, parameter $array2 of array_merge() does only seem to accept array|null, maybe add an additional type check? ( 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');
14
                })->name('apisGenerator.index');
15
                // create new api page
16
                Route::get('/apis-generator/create', function () {
17
                    return view('ApisGenerator/create');
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