owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Function Client has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var Client = function(options) {
        this._root = options.root;
        if (this._root.charAt(this._root.length - 1) === '/') {
            this._root = this._root.substr(0, this._root.length - 1);
        }
Severity: Minor
Found in core/js/files/client.js - About 1 hr to fix

    Function computerFileSize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        computerFileSize: function (string) {
            if (typeof string !== 'string') {
                return null;
            }
    
    
    Severity: Minor
    Found in core/js/js.js - About 1 hr to fix

      Function dialog_createTitlebar has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.ui.dialog.dialog_createTitlebar = function() {
          var uiDialogTitle;
          this.uiDialogTitlebar = $( "<div>" );
          this._addClass( this.uiDialogTitlebar,
              "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
      Severity: Minor
      Found in core/js/js.js - About 1 hr to fix

        Function callPropPatch has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function callPropPatch(client, options, model, headers) {
                var changes = model.changed;
                if (options.wait && _.isEmpty(changes)) {
                    // usually with "wait" mode, the changes aren't set yet,
                    changes = options.data;
        Severity: Minor
        Found in core/js/oc-backbone-webdav.js - About 1 hr to fix

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

              public function sendEmail($userId, $mailAddress) {
                  $token = $this->config->getUserValue($userId, 'owncloud', 'changeMail');
                  if ($token !== '') {
                      $splittedToken = \explode(':', $token);
                      if ((\count($splittedToken)) === 3 && $splittedToken[0] > ($this->timeFactory->getTime() - 60 * 5)) {
          Severity: Minor
          Found in settings/Controller/UsersController.php - About 1 hr to fix

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

                public function getPanel() {
                    $tmpl = new Template('files_sharing', 'settings-personal');
                    $enabledConfigs = [];
                    foreach (self::USER_CONFIGS as $config) {
                        if ($config['key'] === 'auto_accept_share') {
            Severity: Minor
            Found in apps/files_sharing/lib/Panels/Personal/PersonalPanel.php - About 1 hr to fix

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

                  public function sendNotification(IShare $share) {
                      if ($share->getShareType() !== \OCP\Share::SHARE_TYPE_USER &&
                          $share->getShareType() !== \OCP\Share::SHARE_TYPE_GROUP) {
                          return;
                      }
              Severity: Minor
              Found in apps/files_sharing/lib/Service/NotificationPublisher.php - About 1 hr to fix

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

                    public function getProperties($properties) {
                        if (($properties === null) || ($properties === [])) {
                            $properties = \array_keys($this->properties);
                        }
                
                
                Severity: Minor
                Found in apps/comments/lib/Dav/CommentNode.php - About 1 hr to fix

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

                      private function createAddressbooksTable(Schema $schema) {
                          if (!$schema->hasTable("{$this->prefix}addressbooks")) {
                              $table = $schema->createTable("{$this->prefix}addressbooks");
                              $table->addColumn('id', 'integer', [
                                  'autoincrement' => true,
                  Severity: Minor
                  Found in apps/dav/appinfo/Migrations/Version20170116150538.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

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

                          public function createCalendar($principalUri, $calendarUri, array $properties) {
                              $principalUri = $this->convertPrincipal($principalUri, true);
                              $values = [
                                  'principaluri' => $principalUri,
                                  'uri'          => $calendarUri,
                      Severity: Minor
                      Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 1 hr to fix

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

                            public static function xmlDeserialize(Reader $reader) {
                                $newProps = [
                                    'properties' => [],
                                    'searchInfo' => null,
                                ];
                        Severity: Minor
                        Found in apps/dav/lib/Files/Xml/SearchRequest.php - About 1 hr to fix

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

                              public static function initSession() {
                                  // Let the session name be changed in the initSession Hook
                                  $sessionName = OC_Util::getInstanceId();
                          
                                  try {
                          Severity: Minor
                          Found in lib/kernel.php - About 1 hr to fix

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

                                public function get($groupSearch = '', $userSearch = '') {
                                    $key = $groupSearch . '::' . $userSearch;
                                    if (isset($this->metaData[$key])) {
                                        return $this->metaData[$key];
                                    }
                            Severity: Minor
                            Found in lib/private/Group/MetaData.php - About 1 hr to fix

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

                                  public function getTagsByIds($tagIds) {
                                      if (!\is_array($tagIds)) {
                                          $tagIds = [$tagIds];
                                      }
                              
                              
                              Severity: Minor
                              Found in lib/private/SystemTag/SystemTagManager.php - About 1 hr to fix

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

                                    public function searchByTag($tag, $userId) {
                                        $sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, ' .
                                            '`mimetype`, `mimepart`, `size`, `mtime`, ' .
                                            '`encrypted`, `etag`, `permissions`, `checksum` ' .
                                            'FROM `*PREFIX*filecache` `file`, ' .
                                Severity: Minor
                                Found in lib/private/Files/Cache/Cache.php - About 1 hr to fix

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

                                      public function registerMounts(IUser $user, array $mounts) {
                                          /** @var ICachedMountInfo[] $newMounts */
                                          $newMounts = \array_map(function (IMountPoint $mount) use ($user) {
                                              // filter out any storages which aren't scanned yet since we aren't interested in files from those storages (yet)
                                              if ($mount->getStorageRootId() === -1) {
                                  Severity: Minor
                                  Found in lib/private/Files/Config/UserMountCache.php - About 1 hr to fix

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

                                        public function propagateChange($internalPath, $time, $sizeDifference = 0) {
                                            $storageId = (int)$this->storage->getStorageCache()->getNumericId();
                                    
                                            $parents = $this->getParents($internalPath);
                                    
                                    
                                    Severity: Minor
                                    Found in lib/private/Files/Cache/Propagator.php - About 1 hr to fix

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

                                          protected function doAppUpgrade() {
                                              $apps = \OC_App::getEnabledApps();
                                              $priorityTypes = ['authentication', 'filesystem', 'logging'];
                                              $pseudoOtherType = 'other';
                                              $stacks = [$pseudoOtherType => []];
                                      Severity: Minor
                                      Found in lib/private/Updater.php - About 1 hr to fix

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

                                            public function rename($from, $to) {
                                                $from = \trim($from);
                                                $to = \trim($to);
                                        
                                                if ($to === '' || $from === '') {
                                        Severity: Minor
                                        Found in lib/private/Tags.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language