owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method getOrCreateEntry has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function getOrCreateEntry($storageId, $path, $reuseFileId = null) {
        if ($path === '.') {
            $path = '';
        }
        // find the correct parent
Severity: Major
Found in lib/private/Repair/RepairMismatchFileCachePath.php - About 2 hrs to fix

    Method getSingleFile has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private static function getSingleFile($view, $dir, $name, $params) {
            $filename = "{$dir}/{$name}";
            OC_Util::obEnd();
            $view->lockFile($filename, ILockingProvider::LOCK_SHARED);
    
    
    Severity: Major
    Found in lib/private/legacy/files.php - About 2 hrs to fix

      Method initTemplateEngine has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function initTemplateEngine($renderAs) {
              if (self::$initTemplateEngineFirstRun) {
                  //apps that started before the template initialization can load their own scripts/styles
                  //so to make sure this scripts/styles here are loaded first we use OC_Util::addScript() with $prepend=true
                  //meaning the last script/style in this list will be loaded first
      Severity: Major
      Found in lib/private/legacy/template.php - About 2 hrs to fix

        File DBConfigService.php has 266 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * @author Joas Schilling <coding@schilljs.com>
         * @author Jörn Friedrich Dreyer <jfd@butonic.de>
         * @author Robin Appelman <icewind@owncloud.com>
        Severity: Minor
        Found in lib/private/Files/External/Service/DBConfigService.php - About 2 hrs to fix

          Function loadStorages has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              loadStorages: function() {
                  var self = this;
                  var ajaxRequests = [];
          
                  if (this._isPersonal) {
          Severity: Major
          Found in apps/files_external/js/settings.js - About 2 hrs to fix

            Function attach has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    attach: function(fileList) {
                        var self = this;
                        if (this.ignoreLists.indexOf(fileList.id) >= 0) {
                            return;
                        }
            Severity: Major
            Found in apps/comments/js/filesplugin.js - About 2 hrs to fix

              Method getInternalDriveFile has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function getInternalDriveFile($path) {
                      // Remove leading and trailing slashes
                      $path = \trim($path, '/');
                      if ($path === '.') {
                          $path = '';
              Severity: Major
              Found in apps/files_external/lib/Lib/Storage/Google.php - About 2 hrs to fix

                Method writeExtra has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function writeExtra($app, $message, $level, $conditionalLogFile, $extraFields = []) {
                        $config = \OC::$server->getSystemConfig();
                
                        // default to ISO8601
                        $format = $config->getValue('logdateformat', 'c');
                Severity: Major
                Found in lib/private/Log/Owncloud.php - About 2 hrs to fix

                  Method delete has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function delete($parent, $excludeParent = false, $uidOwner = null, $newParent = null, $excludeGroupChildren = false) {
                          $ids = [$parent];
                          $deletedItems = [];
                          $changeParent = [];
                          $parents = [$parent];
                  Severity: Major
                  Found in lib/private/Share/Helper.php - About 2 hrs to fix

                    Method castValue has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function castValue($value, $type) {
                            switch ($type) {
                                case 'integer':
                                case 'int':
                                    if (!\is_numeric($value)) {
                    Severity: Major
                    Found in core/Command/Config/System/SetConfig.php - About 2 hrs to fix

                      Method validateInput has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function validateInput(InputInterface $input, OutputInterface $output, $supportedDatabases) {
                              $db = \strtolower($input->getOption('database'));
                      
                              if (!\in_array($db, $supportedDatabases)) {
                                  throw new InvalidArgumentException("Database <$db> is not supported.");
                      Severity: Major
                      Found in core/Command/Maintenance/Install.php - About 2 hrs to fix

                        File setupchecks.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*
                         * Copyright (c) 2014
                         *
                         * This file is licensed under the Affero General Public License version 3
                         * or later.
                        Severity: Minor
                        Found in core/js/setupchecks.js - About 2 hrs to fix

                          File user.php has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * @author Aldo "xoen" Giambelluca <xoen@xoen.org>
                           * @author Andreas Fischer <bantu@owncloud.com>
                           * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                          Severity: Minor
                          Found in lib/private/legacy/user.php - About 2 hrs to fix

                            File Manager.php has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            /**
                             * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                             * @author Joas Schilling <coding@schilljs.com>
                             * @author Jörn Friedrich Dreyer <jfd@butonic.de>
                            Severity: Minor
                            Found in lib/private/User/Manager.php - About 2 hrs to fix

                              EmptyContentSecurityPolicy has 22 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class EmptyContentSecurityPolicy {
                                  /** @var bool Whether inline JS snippets are allowed */
                                  protected $inlineScriptAllowed = null;
                                  /**
                                   * @var bool Whether eval in JS scripts is allowed
                              Severity: Minor
                              Found in lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php - About 2 hrs to fix

                                Manager has 22 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class Manager extends PublicEmitter implements IGroupManager {
                                    /**
                                     * @var GroupInterface[] $backends
                                     */
                                    private $backends = [];
                                Severity: Minor
                                Found in lib/private/Group/Manager.php - About 2 hrs to fix

                                  Event has 22 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Event implements IEvent {
                                      /** @var array */
                                      protected $data = [
                                          'app' => null,
                                          'type' => null,
                                  Severity: Minor
                                  Found in lib/private/Activity/Event.php - About 2 hrs to fix

                                    OC_Helper has 22 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class OC_Helper {
                                        private static $templateManager;
                                    
                                        /**
                                         * Creates an absolute url for public use
                                    Severity: Minor
                                    Found in lib/private/legacy/helper.php - About 2 hrs to fix

                                      MigrationService has 22 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class MigrationService {
                                          /** @var boolean */
                                          private $migrationTableCreated;
                                          /** @var array */
                                          private $migrations;
                                      Severity: Minor
                                      Found in lib/private/DB/MigrationService.php - About 2 hrs to fix

                                        AllConfig has 22 functions (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        class AllConfig implements IConfig {
                                            /** @var SystemConfig */
                                            private $systemConfig;
                                        
                                            /** @var IDBConnection */
                                        Severity: Minor
                                        Found in lib/private/AllConfig.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language