anonymous()
last analyzed

Size

Total Lines 39
Code Lines 26

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 26
nc 128
nop 0
dl 0
loc 39
c 0
b 0
f 0
1
<?php
2
3
use Illuminate\Routing\Middleware\SubstituteBindings;
0 ignored issues
show
Bug introduced by
The type Illuminate\Routing\Middleware\SubstituteBindings 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 Illuminate\Support\Facades\Route;
0 ignored issues
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...
5
use SaasReady\Http\Controllers\CountryController;
6
use SaasReady\Http\Controllers\CurrencyController;
7
use SaasReady\Http\Controllers\DynamicSettingsController;
8
use SaasReady\Http\Controllers\EventController;
9
use SaasReady\Http\Controllers\LanguageController;
10
use SaasReady\Http\Controllers\ReleaseNoteController;
11
use SaasReady\Http\Controllers\TranslationController;
12
13
Route::prefix(config('saas-ready.route-prefix'))
0 ignored issues
show
Bug introduced by
The function config 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
Route::prefix(/** @scrutinizer ignore-call */ config('saas-ready.route-prefix'))
Loading history...
14
    ->middleware([
15
        SubstituteBindings::class,
16
        ...config('saas-ready.middlewares'),
17
    ])
18
    ->group(function () {
19
        if (config('saas-ready.route-enabled.currencies')) {
0 ignored issues
show
Bug introduced by
The function config 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

19
        if (/** @scrutinizer ignore-call */ config('saas-ready.route-enabled.currencies')) {
Loading history...
20
            Route::resource('currencies', CurrencyController::class)
21
                ->except(['edit', 'create']);
22
        }
23
24
        if (config('saas-ready.route-enabled.countries')) {
25
            Route::resource('countries', CountryController::class)
26
                ->except(['edit', 'create']);
27
        }
28
29
        if (config('saas-ready.route-enabled.languages')) {
30
            Route::resource('languages', LanguageController::class)
31
                ->except(['edit', 'create']);
32
        }
33
34
        if (config('saas-ready.route-enabled.events')) {
35
            Route::resource('events', EventController::class)
36
                ->only([
37
                    'index',
38
                    'show',
39
                ]);
40
        }
41
42
        if (config('saas-ready.route-enabled.translations')) {
43
            Route::resource('translations', TranslationController::class)
44
                ->except(['edit', 'create']);
45
        }
46
47
        if (config('saas-ready.route-enabled.dynamic-settings')) {
48
            Route::resource('dynamic-settings', DynamicSettingsController::class)
49
                ->except(['edit', 'create'])
50
                ->parameter('dynamic-setting', 'dynamicSetting');
51
        }
52
53
        if (config('saas-ready.route-enabled.release-notes')) {
54
            Route::resource('release-notes', ReleaseNoteController::class)
55
                ->except(['edit', 'create'])
56
                ->parameter('release-note', 'releaseNote');
57
        }
58
    });
59