owncloud/core

View on GitHub
apps/federatedfilesharing/lib/AppInfo/Application.php

Summary

Maintainability
C
1 day
Test Coverage

Method __construct has 116 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct() {
        parent::__construct('federatedfilesharing');
        $container = $this->getContainer();
        $server = $container->getServer();

Severity: Major
Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 4 hrs to fix

    Method registerListeners has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function registerListeners() {
            $container = $this->getContainer();
            $server = $container->getServer();
            $eventDispatcher = $server->getEventDispatcher();
    
    
    Severity: Minor
    Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 1 hr to fix

      Method initFederatedShareProvider has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function initFederatedShareProvider() {
              $addressHandler = new AddressHandler(
                  \OC::$server->getURLGenerator(),
                  \OC::$server->getL10N('federatedfilesharing')
              );
      Severity: Minor
      Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 1 hr to fix

        Avoid too many return statements within this method.
        Open

                        return new OcmController(
                            $c->query('AppName'),
                            $c->query('Request'),
                            $c->query('OcmMiddleware'),
                            $server->getURLGenerator(),
        Severity: Major
        Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return new NotificationManager();
          Severity: Major
          Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return new OcmMiddleware(
                                $this->getFederatedShareProvider(),
                                $server->getAppManager(),
                                $server->getUserManager(),
                                $c->query('AddressHandler'),
            Severity: Major
            Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return new RequestHandlerController(
                                  $c->query('AppName'),
                                  $c->query('Request'),
                                  $c->query('OcmMiddleware'),
                                  $server->getUserManager(),
              Severity: Major
              Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return new PollIncomingShares(
                                    $server->getDatabaseConnection(),
                                    $server->getUserManager(),
                                    \OC\Files\Filesystem::getLoader(),
                                    $externalManager,
                Severity: Major
                Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 30 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status