owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Function registerAppsSlideToggle has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var registerAppsSlideToggle = function () {
        var buttons = $('[data-apps-slide-toggle]');

        $(document).click(function (event) {

Severity: Minor
Found in core/js/apps.js - About 1 hr to fix

    Function hide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        hide: function ($row, callback) {
            var self = this;
            var $notification = $('#notification');
    
            if (_.isFunction($row)) {
    Severity: Minor
    Found in core/js/js.js - About 1 hr to fix

      Method exec has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function exec($folder, $license, $gitRoot = false) {
              if (isset($this->licenseText[$license])) {
                  echo "Unknown license $license. Supported: agpl, gpl or ocl";
              }
              $license = $this->licenseText[$license];
      Severity: Minor
      Found in build/license.php - About 1 hr to fix

        Method changeMail has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method notifyRecipients has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function notifyRecipients($itemSource, $itemType, $shareType, $recipient) {
                  $recipientList = [];
                  $sender = $this->userSession->getUser();
                  if ($shareType === Share::SHARE_TYPE_USER) {
                      $recipientList[] = $this->userManager->get($recipient);
          Severity: Minor
          Found in apps/files_sharing/lib/Controller/NotificationController.php - About 1 hr to fix

            Method removeShare has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function removeShare($mountPoint) {
                    if ($this->uid === null) {
                        throw new NoUserException();
                    }
            
            
            Severity: Minor
            Found in apps/files_sharing/lib/External/Manager.php - About 1 hr to fix

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

                  protected function run($argument) {
                      $enabled = $this->config->getAppValue('files_sharing', 'cronjob_scan_external_enabled', 'no');
                      if ($enabled !== 'yes') {
                          $this->logger->debug(
                              "Fed share scanner disabled, ignoring the run"
              Severity: Minor
              Found in apps/files_sharing/lib/External/ScanExternalSharesJob.php - About 1 hr to fix

                Method getCalendarById has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getCalendarById($calendarId) {
                        $fields = \array_values($this->propertyMap);
                        $fields[] = 'id';
                        $fields[] = 'uri';
                        $fields[] = 'synctoken';
                Severity: Minor
                Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 1 hr to fix

                  Method convertToSabreException has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function convertToSabreException(\Exception $e) {
                          if ($e instanceof FileContentNotAllowedException) {
                              // the file content is not permitted
                              throw new DAVForbiddenException($e->getMessage(), $e->getRetry(), $e);
                          }
                  Severity: Minor
                  Found in apps/dav/lib/Connector/Sabre/File.php - About 1 hr to fix

                    Method createDavSharesTable has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function createDavSharesTable(Schema $schema) {
                            if (!$schema->hasTable("{$this->prefix}dav_shares")) {
                                $table = $schema->createTable("{$this->prefix}dav_shares");
                                $table->addColumn('id', 'integer', [
                                    'autoincrement' => true,
                    Severity: Minor
                    Found in apps/dav/appinfo/Migrations/Version20170116150538.php - About 1 hr to fix

                      Method createSchedulingObjectsTable has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function createSchedulingObjectsTable(Schema $schema) {
                              if (!$schema->hasTable("{$this->prefix}schedulingobjects")) {
                                  $table = $schema->createTable("{$this->prefix}schedulingobjects");
                                  $table->addColumn('id', 'integer', [
                                      'autoincrement' => true,
                      Severity: Minor
                      Found in apps/dav/appinfo/Migrations/Version20170116150538.php - About 1 hr to fix

                        Method onReport has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function onReport($reportName, $report, $uri) {
                                $reportTargetNode = $this->server->tree->getNodeForPath($uri);
                                if (!$reportTargetNode instanceof Directory ||
                                        $reportName !== self::REPORT_NAME) {
                                    return;
                        Severity: Minor
                        Found in apps/dav/lib/Connector/Sabre/FilesSearchReportPlugin.php - About 1 hr to fix

                          Method xmlSerialize has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function xmlSerialize(Writer $writer) {
                                  $cs = '{' . Plugin::NS_OWNCLOUD . '}';
                          
                                  if ($this->organizer !== null) {
                                      $writer->startElement($cs . 'organizer');
                          Severity: Minor
                          Found in apps/dav/lib/DAV/Sharing/Xml/Invite.php - About 1 hr to fix

                            Method configure has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function configure() {
                                    $this
                                        ->setName('files_external:applicable')
                                        ->setDescription('Manage applicable users and groups for a mount')
                                        ->addArgument(
                            Severity: Minor
                            Found in apps/files_external/lib/Command/Applicable.php - About 1 hr to fix

                              Method createAddressBook has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function createAddressBook($principalUri, $url, array $properties) {
                                      $values = [
                                          'displayname' => null,
                                          'description' => null,
                                          'principaluri' => $principalUri,
                              Severity: Minor
                              Found in apps/dav/lib/CardDAV/CardDavBackend.php - About 1 hr to fix

                                Method update has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function update(
                                        $id,
                                        $mountPoint,
                                        $backend,
                                        $authMechanism,
                                Severity: Minor
                                Found in apps/files_external/lib/Controller/GlobalStoragesController.php - About 1 hr to fix

                                  Method getFolderContents has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function getFolderContents($path) {
                                          $this->log('enter: '.__FUNCTION__."($path)");
                                          try {
                                              $path = $this->buildPath($path);
                                              $result = [];
                                  Severity: Minor
                                  Found in apps/files_external/lib/Lib/Storage/SMB.php - About 1 hr to fix

                                    Method create has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function create(
                                            $mountPoint,
                                            $backend,
                                            $authMechanism,
                                            $backendOptions,
                                    Severity: Minor
                                    Found in apps/files_external/lib/Controller/UserStoragesController.php - About 1 hr to fix

                                      Method findUsersInGroup has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function findUsersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
                                              $group = $this->get($gid);
                                              if ($group === null) {
                                                  return [];
                                              }
                                      Severity: Minor
                                      Found in lib/private/Group/Manager.php - About 1 hr to fix

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

                                            public function rename($path1, $path2) {
                                                $srcParent = \dirname($path1);
                                                $dstParent = \dirname($path2);
                                        
                                                if (!$this->isUpdatable($srcParent)) {
                                        Severity: Minor
                                        Found in lib/private/Files/Storage/Local.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language