owncloud/core

View on GitHub
apps/files_external/lib/Controller/UserStoragesController.php

Summary

Maintainability
B
6 hrs
Test Coverage

Method update has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function update(
        $id,
        $mountPoint,
        $backend,
        $authMechanism,
Severity: Minor
Found in apps/files_external/lib/Controller/UserStoragesController.php - About 1 hr to fix

    Method create has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function create(
            $mountPoint,
            $backend,
            $authMechanism,
            $backendOptions,
    Severity: Minor
    Found in apps/files_external/lib/Controller/UserStoragesController.php - About 1 hr to fix

      Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $AppName,
              IRequest $request,
              IL10N $l10n,
              IUserStoragesService $userStoragesService,
              IUserSession $userSession,
      Severity: Major
      Found in apps/files_external/lib/Controller/UserStoragesController.php - About 50 mins to fix

        Method update has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $id,
                $mountPoint,
                $backend,
                $authMechanism,
                $backendOptions,
        Severity: Major
        Found in apps/files_external/lib/Controller/UserStoragesController.php - About 50 mins to fix

          Method create has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $mountPoint,
                  $backend,
                  $authMechanism,
                  $backendOptions,
                  $mountOptions
          Severity: Minor
          Found in apps/files_external/lib/Controller/UserStoragesController.php - About 35 mins to fix

            Avoid too many return statements within this method.
            Open

                    return new DataResponse(
                        $storage,
                        Http::STATUS_OK
                    );
            Severity: Major
            Found in apps/files_external/lib/Controller/UserStoragesController.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return new DataResponse(
                          $newStorage,
                          Http::STATUS_CREATED
                      );
              Severity: Major
              Found in apps/files_external/lib/Controller/UserStoragesController.php - About 30 mins to fix

                There are no issues that match your filters.

                Category
                Status