owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

File ListCommand.php has 280 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * @author Robin Appelman <icewind@owncloud.com>
 * @author Vincent Petry <pvince81@owncloud.com>
 *
Severity: Minor
Found in apps/files_external/lib/Command/ListCommand.php - About 2 hrs to fix

    Method getDiff has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) {
            $schemaDiff = parent::getDiff($targetSchema, $connection);
    
            // oracle forces us to quote the identifiers
            $schemaDiff->newTables = \array_map(function (Table $table) {
    Severity: Major
    Found in lib/private/DB/OracleMigrator.php - About 2 hrs to fix

      File profile.js has 279 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * Post the email address change to the server.
       */
      function changeEmailAddress () {
          var emailInfo = $('#email');
      Severity: Minor
      Found in settings/js/panels/profile.js - About 2 hrs to fix

        Function _onClickFile has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _onClickFile: function(event) {
                    this._setCurrentRow($(event.currentTarget).closest('tr'));
        
                    var $link = $(event.target).closest('a');
                    if ($link.attr('href') === '#' || $link.hasClass('disable-click')) {
        Severity: Major
        Found in apps/files/js/filelist.js - About 2 hrs to fix

          Method move2trash has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function move2trash($file_path) {
                  // get the user for which the filesystem is setup
                  $root = Filesystem::getRoot();
                  list(, $user) = \explode('/', $root);
                  list($owner, $ownerPath) = self::getUidAndFilename($file_path);
          Severity: Major
          Found in apps/files_trashbin/lib/Trashbin.php - About 2 hrs to fix

            Method getSpecialParameterList has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getSpecialParameterList($app, $text) {
                    if ($app === self::APP_FILES) {
                        switch ($text) {
                            case 'created_self':
                                return [
            Severity: Major
            Found in apps/files/lib/Activity.php - About 2 hrs to fix

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

                  public function update(\OCP\Share\IShare $share) {
                      $this->validate($share);
              
                      $shareAttributes = $this->formatShareAttributes(
                          $share->getAttributes()
              Severity: Major
              Found in lib/private/Share20/DefaultShareProvider.php - About 2 hrs to fix

                Method initialize has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function initialize() {
                        $loadedExtensions = \get_loaded_extensions();
                        $packages = [];
                
                        // Extensions scanning
                Severity: Major
                Found in lib/private/App/PlatformRepository.php - About 2 hrs to fix

                  Method loadFromFile has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function loadFromFile($imagePath = false) {
                          // exif_imagetype throws "read error!" if file is less than 12 byte
                          if (!@\is_file($imagePath) || !\file_exists($imagePath) || \filesize($imagePath) < 12 || !\is_readable($imagePath)) {
                              return false;
                          }
                  Severity: Major
                  Found in lib/private/legacy/image.php - About 2 hrs to fix

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

                        protected function execute(InputInterface $input, OutputInterface $output): int {
                            $userNameSubString = $input->getArgument('search-pattern');
                            $attributes = \array_map('mb_strtolower', $input->getOption('attributes'));
                            $showAllAttributes = $input->getOption('show-all-attributes');
                            $useKey = \count($attributes) > 1
                    Severity: Major
                    Found in core/Command/User/ListUsers.php - About 2 hrs to fix

                      File de_AT.js has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      OC.L10N.register(
                          "core",
                          {
                          "Please select a file." : "Bitte wähle eine Datei aus.",
                          "File is too big" : "Datei ist zu groß",
                      Severity: Minor
                      Found in core/l10n/de_AT.js - About 2 hrs to fix

                        File RequestHandlerController.php has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                         * @author Björn Schießle <bjoern@schiessle.org>
                         * @author Joas Schilling <coding@schilljs.com>
                        Severity: Minor
                        Found in apps/federatedfilesharing/lib/Controller/RequestHandlerController.php - About 2 hrs to fix

                          UsersController has 24 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class UsersController extends Controller {
                              /** @var IL10N */
                              private $l10n;
                              /** @var Session */
                              private $userSession;
                          Severity: Minor
                          Found in settings/Controller/UsersController.php - About 2 hrs to fix

                            DBConfigService has 24 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class DBConfigService {
                                public const MOUNT_TYPE_ADMIN = 1;
                                public const MOUNT_TYPE_PERSONAl = 2;
                            
                                public const APPLICABLE_TYPE_GLOBAL = 1;
                            Severity: Minor
                            Found in lib/private/Files/External/Service/DBConfigService.php - About 2 hrs to fix

                              RepairMimeTypes has 24 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class RepairMimeTypes implements IRepairStep {
                                  /**
                                   * @var \OCP\IConfig
                                   */
                                  protected $config;
                              Severity: Minor
                              Found in lib/private/Repair/RepairMimeTypes.php - About 2 hrs to fix

                                ContentSecurityPolicy has 24 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class ContentSecurityPolicy extends \OCP\AppFramework\Http\ContentSecurityPolicy {
                                    /**
                                     * @return boolean
                                     */
                                    public function isInlineScriptAllowed() {
                                Severity: Minor
                                Found in lib/private/Security/CSP/ContentSecurityPolicy.php - About 2 hrs to fix

                                  Comment has 24 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Comment implements IComment {
                                      protected array $data = [
                                          'id'              => '',
                                          'parentId'        => '0',
                                          'topmostParentId' => '0',
                                  Severity: Minor
                                  Found in lib/private/Comments/Comment.php - About 2 hrs to fix

                                    Manager has 24 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class Manager implements ICommentsManager {
                                        use EventEmitterTrait;
                                        /** @var  IDBConnection */
                                        protected $dbConn;
                                    
                                    
                                    Severity: Minor
                                    Found in lib/private/Comments/Manager.php - About 2 hrs to fix

                                      File filelist.js has 277 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      /*
                                       * Copyright (c) 2014
                                       *
                                       * This file is licensed under the Affero General Public License version 3
                                       * or later.
                                      Severity: Minor
                                      Found in apps/files_trashbin/js/filelist.js - About 2 hrs to fix

                                        Function setupGroupsSelect has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            setupGroupsSelect: function($elements, extraOptions, options) {
                                                var self = this;
                                                options = options || {};
                                                if ($elements.length > 0) {
                                                    // note: settings are saved through a "change" event registered
                                        Severity: Major
                                        Found in settings/js/settings.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language