owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

File SyncService.php has 286 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * @author Jörn Friedrich Dreyer <jfd@butonic.de>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 *
Severity: Minor
Found in lib/private/User/SyncService.php - About 2 hrs to fix

    Function message has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        message:function(content, title, dialogType, buttons, callback, modal, cssClass) {
            return $.when(this._getMessageTemplate()).then(function($tmpl) {
                var dialogName = 'oc-dialog-' + OCdialogs.dialogsCounter + '-content';
                var dialogId = '#' + dialogName;
                var $dlg = $tmpl.octemplate({
    Severity: Major
    Found in core/js/oc-dialogs.js - About 2 hrs to fix

      Method changeSchema has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function changeSchema(Schema $schema, array $options) {
              $prefix = $options['tablePrefix'];
              if (!$schema->hasTable("{$prefix}share_external")) {
                  $table = $schema->createTable("{$prefix}share_external");
                  $table->addColumn('id', 'bigint', [
      Severity: Major
      Found in apps/files_sharing/appinfo/Migrations/Version20170804201125.php - About 2 hrs to fix

        Method buildDateFromContact has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function buildDateFromContact($cardData, $dateField, $summarySymbol) {
                if (empty($cardData)) {
                    return null;
                }
                try {
        Severity: Major
        Found in apps/dav/lib/CalDAV/BirthdayService.php - About 2 hrs to fix

          Method moveInto has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function moveInto($targetName, $fullSourcePath, INode $sourceNode) {
                  if (!$sourceNode instanceof Node) {
                      if ($sourceNode instanceof ITrashBinNode) {
                          if (!$this->fileView->isCreatable($this->getPath())) {
                              throw new SabreForbidden('Destination directory is not writable');
          Severity: Major
          Found in apps/dav/lib/Connector/Sabre/Directory.php - About 2 hrs to fix

            Method _output has 71 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function _output($filePath = null, $mimeType = null) {
                    if ($filePath) {
                        if (!\file_exists(\dirname($filePath))) {
                            \mkdir(\dirname($filePath), 0777, true);
                        }
            Severity: Major
            Found in lib/private/legacy/image.php - About 2 hrs to fix

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

                  protected function execute(InputInterface $input, OutputInterface $output): int {
                      $uid = $input->getArgument('uid');
                      if ($this->userManager->userExists($uid)) {
                          $output->writeln('<error>The user "' . $uid . '" already exists.</error>');
                          return 1;
              Severity: Major
              Found in core/Command/User/Add.php - About 2 hrs to fix

                SFTP has 25 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class SFTP extends \OCP\Files\Storage\StorageAdapter {
                    private $host;
                    private $user;
                    private $root;
                    private $port = 22;
                Severity: Minor
                Found in apps/files_external/lib/Lib/Storage/SFTP.php - About 2 hrs to fix

                  NonExistingFolder has 25 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class NonExistingFolder extends Folder {
                      /**
                       * @param string $newPath
                       * @throws \OCP\Files\NotFoundException
                       */
                  Severity: Minor
                  Found in lib/private/Files/Node/NonExistingFolder.php - About 2 hrs to fix

                    CacheWrapper has 25 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class CacheWrapper extends Cache {
                        /**
                         * @var \OCP\Files\Cache\ICache
                         */
                        protected $cache;
                    Severity: Minor
                    Found in lib/private/Files/Cache/Wrapper/CacheWrapper.php - About 2 hrs to fix

                      File id.js has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      OC.L10N.register(
                          "settings",
                          {
                          "Wrong current password" : "Sandi Anda salah",
                          "The new password cannot be the same as the previous one" : "Sandi baru tidak boleh sama dengan sebelumnya",
                      Severity: Minor
                      Found in settings/l10n/id.js - About 2 hrs to fix

                        File ast.js has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        OC.L10N.register(
                            "settings",
                            {
                            "No user supplied" : "Nun s'especificó un usuariu",
                            "Authentication error" : "Fallu d'autenticación",
                        Severity: Minor
                        Found in settings/l10n/ast.js - About 2 hrs to fix

                          File SharedStorage.php has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * @author Bart Visscher <bartv@thisnet.nl>
                           * @author Björn Schießle <bjoern@schiessle.org>
                           * @author Joas Schilling <coding@schilljs.com>
                          Severity: Minor
                          Found in apps/files_sharing/lib/SharedStorage.php - About 2 hrs to fix

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

                            <?php
                            /**
                             * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                             * @author Bart Visscher <bartv@thisnet.nl>
                             * @author Bernhard Posselt <dev@bernhard-posselt.com>
                            Severity: Minor
                            Found in lib/private/Group/Manager.php - About 2 hrs to fix

                              Function _save has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      _save: function () {
                                          var deferred = $.Deferred();
                                          var $el = this.$el;
                              
                                          var $formElements       = $el.find('input, textarea, select, button'),
                              Severity: Major
                              Found in core/js/sharedialoglinkshareview.js - About 2 hrs to fix

                                Method mapperEvent has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function mapperEvent(MapperEvent $event) {
                                        $tagIds = $event->getTags();
                                        if ($event->getObjectType() !== 'files' ||empty($tagIds)
                                            || !\in_array($event->getEvent(), [MapperEvent::EVENT_ASSIGN, MapperEvent::EVENT_UNASSIGN])
                                            || !$this->appManager->isInstalled('activity')) {
                                Severity: Major
                                Found in apps/systemtags/lib/Activity/Listener.php - About 2 hrs to fix

                                  Method updateHtaccess has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function updateHtaccess() {
                                          $config = \OC::$server->getConfig();
                                          $il10n = \OC::$server->getL10N('lib');
                                  
                                          // For CLI read the value from overwrite.cli.url
                                  Severity: Major
                                  Found in lib/private/Setup.php - About 2 hrs to fix

                                    Method match has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function match($url) {
                                            if (\substr($url, 0, 6) === '/apps/') {
                                                // empty string / 'apps' / $app / rest of the route
                                                list(, , $app, ) = \explode('/', $url, 4);
                                    
                                    
                                    Severity: Major
                                    Found in lib/private/Route/Router.php - About 2 hrs to fix

                                      File Apps.php has 283 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      <?php
                                      /**
                                       * @author Viktar Dubiniuk <dubiniuk@owncloud.com>
                                       *
                                       * @copyright Copyright (c) 2018, ownCloud GmbH
                                      Severity: Minor
                                      Found in lib/private/Repair/Apps.php - About 2 hrs to fix

                                        Function edit has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            edit:function(type, cb) {
                                                if(!type && !this.type) {
                                                    throw {
                                                        name: 'MissingParameter',
                                                        message: t(
                                        Severity: Major
                                        Found in core/js/tags.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language