rinvex/cortex-foundation

View on GitHub

Showing 183 of 183 total issues

Avoid too many return statements within this method.
Open

                return $this->guard = $guard;
Severity: Major
Found in src/Http/Request.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return $this->prepareResponse($request, $e);
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return false;
Severity: Major
Found in src/Providers/FoundationServiceProvider.php - About 30 mins to fix

Missing class import via use statement (line '33', column '23').
Open

            throw new \Exception("Invalid path: $path");

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

            return intend([
                'url' => Route::has($route) ? route($route) : route("{$request->accessarea()}.home"),
                'with' => ['warning' => trans('cortex/foundation::messages.resource_not_found', ['resource' => $resource, 'identifier' => $matches[0]])],
            ], 404);
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Missing class import via use statement (line '72', column '23').
Open

            throw new \Exception("Invalid path: $path");

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

            return intend([
                'url' => route($request->accessarea().'.cortex.auth.account.login'),
                'with' => ['warning' => trans('cortex/auth::messages.unauthenticated')],
            ], 401);
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return intend([
                'back' => true,
                'withInput' => $request->all(),
                'with' => ['warning' => $e->getMessage()],
            ], $e->getStatusCode()); // 429
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

                return in_array($name, $parameterNames);
Severity: Major
Found in src/Providers/FoundationServiceProvider.php - About 30 mins to fix

Missing class import via use statement (line '64', column '23').
Open

            throw new \Exception("Invalid path: {$path}");

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

                return $this->guard = $guard;
Severity: Major
Found in src/Http/Request.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return $this->guard = $this->isApi ? config('auth.defaults.apiguard') : config('auth.defaults.guard');
Severity: Major
Found in src/Http/Request.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

            return intend([
                'url' => in_array($request->accessarea(), ['tenantarea', 'managerarea']) ? route('tenantarea.home') : route('frontarea.home'),
                'with' => ['warning' => $e->getMessage()],
            ], 403);
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Missing class import via use statement (line '182', column '23').
Open

            throw new \Exception('Module name must consist of two segments: vendor/module');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

        return parent::render($request, $e);
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Missing class import via use statement (line '32', column '23').
Open

            throw new \Exception("Invalid path: $path");

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

                    return intend([
                        'url' => $originalUrl !== $localizedUrl ? $localizedUrl : route("{$request->accessarea()}.home"),
                        'with' => ['warning' => $e->getMessage()],
                    ], $e->getStatusCode()); // 404
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Missing class import via use statement (line '75', column '23').
Open

            throw new \Exception("Invalid path: {$path}");

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

            return intend([
                'url' => route('frontarea.home'),
                'with' => ['warning' => $e->getMessage()],
            ], 404); // 429
Severity: Major
Found in src/Exceptions/ExceptionHandler.php - About 30 mins to fix

Missing class import via use statement (line '98', column '24').
Open

            return new \Cortex\Foundation\Overrides\Illuminate\Session\DatabaseSessionHandler(

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Severity
Category
Status
Source
Language