owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method createFile has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function createFile($name, $data = null) {
        # the check here is necessary, because createFile uses put covered in sabre/file.php
        # and not touch covered in files/view.php
        if (Filesystem::isForbiddenFileOrDir($name)) {
            throw new SabreForbidden();
Severity: Minor
Found in apps/dav/lib/Connector/Sabre/Directory.php - About 2 hrs to fix

    Method opendir has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function opendir($path) {
            $folder = $this->getDriveFile($path);
            if ($folder) {
                $files = [];
                $duplicates = [];
    Severity: Minor
    Found in apps/files_external/lib/Lib/Storage/Google.php - About 2 hrs to fix

      Method getVersions has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getVersions($uid, $filename) {
              $versions = [];
              if ($filename === null || $filename === '') {
                  return $versions;
              }
      Severity: Minor
      Found in apps/files_versions/lib/Storage.php - About 2 hrs to fix

        Method parseRetentionObligation has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function parseRetentionObligation() {
                $splitValues = \explode(',', $this->retentionObligation);
                if (!isset($splitValues[0])) {
                    $minValue = 'auto';
                } else {
        Severity: Minor
        Found in apps/files_versions/lib/Expiration.php - About 2 hrs to fix

          Method getSharedWith has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getSharedWith($userId, $shareType, $node, $limit, $offset) {
                  /** @var Share[] $shares */
                  $shares = [];
          
                  if ($shareType === \OCP\Share::SHARE_TYPE_USER) {
          Severity: Minor
          Found in lib/private/Share20/DefaultShareProvider.php - About 2 hrs to fix

            Method call has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function call($parameters) {
                    $request = \OC::$server->getRequest();
                    $method = $request->getMethod();
            
                    // Prepare the request variables
            Severity: Minor
            Found in lib/private/legacy/api.php - About 2 hrs to fix

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

                  protected function execute(InputInterface $input, OutputInterface $output): int {
                      $appSteps = $this->getAppsRepairSteps($output);
                      // Handle listing repair steps
                      $steps = \array_merge(
                          \OC\Repair::getRepairSteps(),
              Severity: Minor
              Found in core/Command/Maintenance/Repair.php - About 2 hrs to fix

                Function reload has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        reload: function() {
                            this.showMask();
                            if (this._reloadCall) {
                                this._reloadCall.abort();
                            }
                Severity: Minor
                Found in apps/files_sharing/js/sharedfilelist.js - About 1 hr to fix

                  Function applyGroupSelect has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      applyGroupSelect: function (element, user, checked) {
                          var $element = $(element);
                  
                          var checkHandler = null;
                          if(user) { // Only if in a user row, and not the #newusergroups select
                  Severity: Minor
                  Found in settings/js/users/users.js - About 1 hr to fix

                    Function getFilteredFiles has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            getFilteredFiles: function(filter, options) {
                                options = options || {};
                                var self = this;
                                var deferred = $.Deferred();
                                var promise = deferred.promise();
                    Severity: Minor
                    Found in core/js/files/client.js - About 1 hr to fix

                      Function autocompleteRenderItem has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              autocompleteRenderItem: function(ul, item) {
                                  var text = item.label;
                                  var showIcon = false;
                                  var iconClass = "";
                                  var typeInfo = t('core', 'User');
                      Severity: Minor
                      Found in core/js/sharedialogview.js - About 1 hr to fix

                        Function _create has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                _create: function() {
                                    var self = this;
                        
                                    this.originalTitle = this.element.attr('title');
                                    this.options.title = this.options.title || this.originalTitle;
                        Severity: Minor
                        Found in core/js/jquery.ocdialog.js - About 1 hr to fix

                          Method setupFromToken has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function setupFromToken($token, $relativePath = null, $password = null) {
                                  \OC_User::setIncognitoMode(true);
                          
                                  $linkItem = \OCP\Share::getShareByToken($token, !$password);
                                  if ($linkItem === false || ($linkItem['item_type'] !== 'file' && $linkItem['item_type'] !== 'folder')) {
                          Severity: Minor
                          Found in apps/files_sharing/lib/Helper.php - About 1 hr to fix

                            Method handleUpdateProperties has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function handleUpdateProperties($path, PropPatch $propPatch) {
                                    $node = $this->server->tree->getNodeForPath($path);
                                    if (!($node instanceof SystemTagNode)) {
                                        return;
                                    }
                            Severity: Minor
                            Found in apps/dav/lib/SystemTag/SystemTagPlugin.php - About 1 hr to fix

                              Method save has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function save() {
                                      if (\is_array($this->tags)) {
                                          foreach ($this->tags as $tag) {
                                              try {
                                                  if (!$this->mapper->tagExists($tag)) {
                              Severity: Minor
                              Found in lib/private/Tags.php - About 1 hr to fix

                                Method post_deleteUser has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function post_deleteUser($arguments) {
                                        // Find all objectid/tagId pairs.
                                        $result = null;
                                        try {
                                            $stmt = \OCP\DB::prepare('SELECT `id` FROM `' . self::TAG_TABLE . '` '
                                Severity: Minor
                                Found in lib/private/Tags.php - About 1 hr to fix

                                  Method getShareByToken has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getShareByToken($token) {
                                          $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);
                                  
                                          try {
                                              $share = $provider->getShareByToken($token);
                                  Severity: Minor
                                  Found in lib/private/Share20/Manager.php - About 1 hr to fix

                                    Method resizeAndStore has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function resizeAndStore() {
                                            $image = $this->preview;
                                            if (!($image instanceof IImage)) {
                                                Util::writeLog(
                                                    'core',
                                    Severity: Minor
                                    Found in lib/private/Preview.php - About 1 hr to fix

                                      Method checkTokenCredentials has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function checkTokenCredentials(IToken $dbToken, $token) {
                                              // Check whether login credentials are still valid and the user was not disabled
                                              // This check is performed each 5 minutes per default
                                              // However, we try to read last_check_timeout from the appconfig table so the
                                              // administrator could change this 5 minutes timeout
                                      Severity: Minor
                                      Found in lib/private/User/Session.php - About 1 hr to fix

                                        Function render has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                render: function() {
                                                    var self = this;
                                                    this.$el.html(this.template());
                                        
                                                    this.$el.find('[title]').tooltip({placement: 'bottom'});
                                        Severity: Minor
                                        Found in core/js/systemtags/systemtagsinputfield.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language