owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method enterNode has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function enterNode(\PhpParser\Node $node) {
        if ($this->deprecatedClass) {
            return;
        }

Severity: Minor
Found in build/OCPSinceChecker.php - About 1 hr to fix

    Method destroy has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function destroy($id) {
            $userId = $this->userSession->getUser()->getUID();
            $user = $this->userManager->get($id);
    
            if ($userId === $id) {
    Severity: Minor
    Found in settings/Controller/UsersController.php - About 1 hr to fix

      Method scan has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function scan($share) {
              // get mount
              $options = [
                  'remote'    => $share['remote'],
                  'token'        => $share['share_token'],
      Severity: Minor
      Found in apps/files_sharing/lib/External/ScanExternalSharesJob.php - About 1 hr to fix

        Method execute has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function execute(InputInterface $input, OutputInterface $output): int {
                $output->writeln("WARNING: incoming-shares:poll has been deprecated and replaced by periodic external shares cronjob. Please check Federated Cloud Sharing settings and documentation.");
                if ($this->externalMountProvider === null) {
                    $output->writeln("Polling is not possible when files_sharing app is disabled. Please enable it with 'occ app:enable files_sharing'");
                    return 1;
        Severity: Minor
        Found in apps/federatedfilesharing/lib/Command/PollIncomingShares.php - About 1 hr to fix

          Method execute has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function execute(InputInterface $input, OutputInterface $output): int {
                  $checkUploadExistsLocal = $input->getOption('local') === true;
                  $d = $input->getArgument('minimum-age-in-days');
                  $d = \max(2, \min($d, 100));
                  $cutOffTime = new \DateTime("$d days ago");
          Severity: Minor
          Found in apps/dav/lib/Command/CleanupChunks.php - About 1 hr to fix

            Method calendarQuery has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function calendarQuery($calendarId, array $filters) {
                    $componentType = null;
                    $requirePostFilter = true;
                    $timeRange = null;
            
            
            Severity: Minor
            Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 1 hr to fix

              Method getBuiltInPanel has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getBuiltInPanel($className) {
                      $panels = [
                          // Personal
                          Profile::class => new Profile(
                              $this->config,
              Severity: Minor
              Found in lib/private/Settings/SettingsManager.php - About 1 hr to fix

                Method fixUnencryptedSize has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function fixUnencryptedSize($path, $size, $unencryptedSize) {
                        $headerSize = $this->getHeaderSize($path);
                        $header = $this->getHeader($path);
                        $encryptionModule = $this->getEncryptionModule($path);
                
                
                Severity: Minor
                Found in lib/private/Files/Storage/Wrapper/Encryption.php - About 1 hr to fix

                  Method setValue has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function setValue($app, $key, $value) {
                          if ($value === null) {
                              $value = '';
                          }
                  
                  
                  Severity: Minor
                  Found in lib/private/AppConfig.php - About 1 hr to fix

                    Method buildProviderList has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function buildProviderList() {
                            $services = [
                                'PRIVATE_DATA' => [
                                    'version' => 1,
                                    'endpoints' => [
                    Severity: Minor
                    Found in lib/private/OCS/Provider.php - About 1 hr to fix

                      Method fixEntriesWithCorrectParentIdButWrongPath has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function fixEntriesWithCorrectParentIdButWrongPath(IOutput $out, $storageNumericId = null) {
                              $totalResultsCount = 0;
                              $affectedStorages = [$storageNumericId => true];
                      
                              // find all entries where the path entry doesn't match the path value that would
                      Severity: Minor
                      Found in lib/private/Repair/RepairMismatchFileCachePath.php - About 1 hr to fix

                        Method loginUser has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private static function loginUser() {
                                if (self::$isLoggedIn === true) {
                                    return \OC_User::getUser();
                                }
                        
                        
                        Severity: Minor
                        Found in lib/private/legacy/api.php - About 1 hr to fix

                          Method changeSchema has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function changeSchema(Schema $schema, array $options) {
                                  $prefix = $options['tablePrefix'];
                                  $table = $schema->createTable("{$prefix}accounts");
                                  $table->addColumn('id', Type::BIGINT, [
                                      'autoincrement' => true,
                          Severity: Minor
                          Found in core/Migrations/Version20170214112458.php - About 1 hr to fix

                            Method execute has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function execute(InputInterface $input, OutputInterface $output): int {
                                    if ($input->getOption('list')) {
                                        $backends = $this->userManager->getBackends();
                                        foreach ($backends as $backend) {
                                            $output->writeln(\get_class($backend));
                            Severity: Minor
                            Found in core/Command/User/SyncBackend.php - About 1 hr to fix

                              Method buildWebUri has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function buildWebUri(array $app_info, string $fileId): ?string {
                                      $uri = null;
                                      $app_name = $app_info['oc_app_name'];
                                      # https://github.com/ONLYOFFICE/onlyoffice-owncloud/blob/2afca075249f24d857f0b3097d565f5129e88d17/appinfo/routes.php#LL27C47-L27C53
                                      if ($app_name === 'onlyoffice') {
                              Severity: Minor
                              Found in core/Controller/AppRegistryController.php - About 1 hr to fix

                                Method tryLogin has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function tryLogin($user, $password, $redirect_url, $timezone = null, $remember_login = null) {
                                        $originalUser = $user;
                                        // TODO: Add all the insane error handling
                                        $loginResult = $this->userSession->login($user, $password);
                                        if ($loginResult !== true && $this->config->getSystemValue('strict_login_enforced', false) !== true) {
                                Severity: Minor
                                Found in core/Controller/LoginController.php - About 1 hr to fix

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

                                          $appName,
                                          IRequest $request,
                                          IManager $shareManager,
                                          IGroupManager $groupManager,
                                          IUserManager $userManager,
                                  Severity: Major
                                  Found in apps/files_sharing/lib/Controller/Share20OcsController.php - About 1 hr to fix

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

                                            ILogger $logger,
                                            IConfig $config,
                                            ISecureRandom $secureRandom,
                                            IHasher $hasher,
                                            IMountManager $mountManager,
                                    Severity: Major
                                    Found in lib/private/Share20/Manager.php - About 1 hr to fix

                                      Function renderApp has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          renderApp: function(app, template, selector, firstExperimental) {
                                              if (!template) {
                                                  var source   = $("#app-template").html();
                                                  template = Handlebars.compile(source);
                                              }
                                      Severity: Minor
                                      Found in settings/js/admin-apps.js - About 1 hr to fix

                                        Function lazyLoadPreview has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                lazyLoadPreview : function(options) {
                                                    var self = this;
                                                    var path = options.path;
                                                    var mime = options.mime;
                                                    var ready = options.callback;
                                        Severity: Minor
                                        Found in apps/files/js/filelist.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language