owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method copy has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function copy($source, $destination) {
        if (!$this->fileView) {
            throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup');
        }

Severity: Minor
Found in apps/dav/lib/Connector/Sabre/ObjectTree.php - About 1 hr to fix

    Method loadChildrenProperties has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function loadChildrenProperties(INode $node, $requestedProperties) {
            // note: pre-fetching only supported for depth <= 1
            if (!($node instanceof Directory)) {
                return;
            }
    Severity: Minor
    Found in apps/dav/lib/DAV/FileCustomPropertiesBackend.php - About 1 hr to fix

      Method translateLong has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function translateLong($text, IL10N $l, array $params) {
              switch ($text) {
                  case 'created_self':
                      return (string) $l->t('You created %1$s', $params);
                  case 'created_by':
      Severity: Minor
      Found in apps/files/lib/Activity.php - About 1 hr to fix

        Method verifyPath has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function verifyPath($path, $fileName) {
                $l10n = \OC::$server->getL10N('lib');
        
                // verify empty and dot files
                $trimmed = \trim($fileName);
        Severity: Minor
        Found in lib/private/Files/View.php - About 1 hr to fix

          Method touch has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function touch($path, $mtime = null) {
                  $this->init();
                  if ($mtime === null) {
                      $mtime = \OC::$server->getTimeFactory()->getTime();
                  }
          Severity: Minor
          Found in lib/private/Files/Storage/DAV.php - About 1 hr to fix

            Method getTempBaseDir has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getTempBaseDir(): string {
                    if ($this->tmpBaseDir) {
                        return $this->tmpBaseDir;
                    }
            
            
            Severity: Minor
            Found in lib/private/TempManager.php - About 1 hr to fix

              Method getTagsForObjects has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getTagsForObjects(array $objIds) {
                      $entries = [];
              
                      try {
                          $conn = \OC::$server->getDatabaseConnection();
              Severity: Minor
              Found in lib/private/Tags.php - About 1 hr to fix

                Method splitUserRemote has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function splitUserRemote($id) {
                        if (\strpos($id, '@') === false) {
                            $l = \OC::$server->getL10N('lib');
                            $hint = $l->t('Invalid Federated Cloud ID');
                            throw new HintException('Invalid Federated Cloud ID', $hint);
                Severity: Minor
                Found in lib/private/Share/Helper.php - About 1 hr to fix

                  Method run has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function run(IOutput $out) {
                          $ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0');
                  
                          // NOTE TO DEVELOPERS: when adding new mime types, please make sure to
                          // add a version comparison to avoid doing it every time
                  Severity: Minor
                  Found in lib/private/Repair/RepairMimeTypes.php - About 1 hr to fix

                    Method createMailBody has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function createMailBody(
                            $filename,
                            $link,
                            $expiration,
                            $senderDisplayName,
                    Severity: Minor
                    Found in lib/private/Share/MailNotifications.php - About 1 hr to fix

                      Method getSharesBy has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offset) {
                              $qb = $this->dbConn->getQueryBuilder();
                              $qb->select('*')
                                  ->from('share')
                                  ->andWhere($qb->expr()->orX(
                      Severity: Minor
                      Found in lib/private/Share20/DefaultShareProvider.php - About 1 hr to fix

                        Method getDescription has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getDescription($errorCode, $errorObject) {
                                switch ($errorCode) {
                                    case CodeChecker::STATIC_CALL_NOT_ALLOWED:
                                        $functions = $this->getLocalFunctions();
                                        $functions = \array_change_key_case($functions, CASE_LOWER);
                        Severity: Minor
                        Found in lib/private/App/CodeChecker/AbstractCheck.php - About 1 hr to fix

                          Method buildNotExistingFileNameForView has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function buildNotExistingFileNameForView($path, $filename, \OC\Files\View $view) {
                                  if ($path === '/') {
                                      $path = '';
                                  }
                                  if ($pos = \strrpos($filename, '.')) {
                          Severity: Minor
                          Found in lib/private/legacy/helper.php - About 1 hr to fix

                            Method isAuthorised has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private static function isAuthorised($action) {
                                    $level = $action['authlevel'];
                                    switch ($level) {
                                        case API::GUEST_AUTH:
                                            // Anyone can access
                            Severity: Minor
                            Found in lib/private/legacy/api.php - About 1 hr to fix

                              Method getDefaultPageUrl has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function getDefaultPageUrl() {
                                      $urlGenerator = \OC::$server->getURLGenerator();
                                      // Deny the redirect if the URL contains a @
                                      // This prevents unvalidated redirects like ?redirect_url=:user@domain.com
                                      if (isset($_REQUEST['redirect_url']) && \strpos($_REQUEST['redirect_url'], '@') === false) {
                              Severity: Minor
                              Found in lib/private/legacy/util.php - About 1 hr to fix

                                Method analyzeStream has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function analyzeStream($stream, array $processors = [], int $maxBytes = PHP_INT_MAX) {
                                        $byteCount = 0;
                                        $map = [];
                                        $processorActions = [
                                            'count' => 'processCountChars',
                                Severity: Minor
                                Found in lib/private/Utf8Analyzer.php - About 1 hr to fix

                                  Method acquireLock has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function acquireLock($path, $type) {
                                          if (\strlen($path) > 64) { // max length in file_locks
                                              throw new \InvalidArgumentException("Lock key length too long");
                                          }
                                          $expire = $this->getExpireTime();
                                  Severity: Minor
                                  Found in lib/private/Lock/DBLockingProvider.php - About 1 hr to fix

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

                                            fetchNext: function(options) {
                                                var self = this;
                                                if (!this.hasMoreResults()) {
                                                    return null;
                                                }
                                    Severity: Minor
                                    Found in apps/comments/js/commentcollection.js - About 1 hr to fix

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

                                                  success: function (apps) {
                                                      var appListWithIndex = _.indexBy(apps.apps, 'id');
                                                      OC.Settings.Apps.State.apps = appListWithIndex;
                                                      var appList = _.map(appListWithIndex, function(app) {
                                                          // default values for missing fields
                                      Severity: Minor
                                      Found in settings/js/admin-apps.js - About 1 hr to fix

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

                                            translate: function(app, text, vars, count, options) {
                                                var defaultOptions = {
                                                        escape: true
                                                    },
                                                    allOptions = options || {};
                                        Severity: Minor
                                        Found in core/js/l10n.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language