gregoriohc/laravel-preview

View on GitHub
src/Controller.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method show has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function show($view, Request $request)
    {
        if (!PreviewServiceProvider::isEnabled()) {
            abort(404);
        }
Severity: Major
Found in src/Controller.php - About 2 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                                                if (is_callable([$class, $method])) {
                                                    $object = new $class();
                                                    if (is_callable([$object, $method])) {
                                                        $value = call_user_func_array([$object, $method], $params);
                                                    }
    Severity: Major
    Found in src/Controller.php - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status