owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Function _onClickRevertVersion has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _onClickRevertVersion: function(ev) {
            var self = this;
            var $target = $(ev.target);
            var fileInfoModel = this.versionsRoot.getFileInfo();
            var revision;
Severity: Major
Found in apps/files_versions/js/versionstabview.js - About 2 hrs to fix

    Function _renderRow has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _renderRow: function(fileData, options) {
                options = options || {};
                var type = fileData.type || 'file',
                    mime = fileData.mimetype,
                    path = fileData.path || this.getCurrentDirectory(),
    Severity: Major
    Found in apps/files/js/filelist.js - About 2 hrs to fix

      Function _extendFileActions has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _extendFileActions: function(fileList) {
                  var self = this;
                  fileList.fileActions.registerAction({
                      name: 'lock-status',
                      displayName: t('files', 'Lock status'),
      Severity: Major
      Found in apps/files/js/filelockplugin.js - About 2 hrs to fix

        Method checkStorageAvailability has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function checkStorageAvailability() {
                // WARNING: Disabling this setting is recommended only in tightly integrated federated setups as temporarly setting,
                // should NOT be used in decentralized federation setup. It could cause bad user experience when dealing
                // with deleted external shares
                // NOTE: This allows administrator to disable cleanup of invalid shares so only manual removal by user or admin is possible,
        Severity: Major
        Found in apps/files_sharing/lib/External/Storage.php - About 2 hrs to fix

          Method createShare has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createShare(
                  Address $ownerAddress,
                  Address $sharedByAddress,
                  $shareWith,
                  $remoteId,
          Severity: Major
          Found in apps/federatedfilesharing/lib/FedShareManager.php - About 2 hrs to fix

            Method createFederatedShare has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function createFederatedShare(IShare $share) {
                    $token = $this->tokenHandler->generateToken();
                    $shareId = $this->addShareToDB(
                        $share->getNodeId(),
                        $share->getNodeType(),
            Severity: Major
            Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 2 hrs to fix

              Method createCalendarsTable has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method httpGet has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function httpGet(RequestInterface $request, ResponseInterface $response) {
                        $queryParams = $request->getQueryParameters();
                        if (!\array_key_exists('preview', $queryParams)) {
                            return true;
                        }
                Severity: Major
                Found in apps/dav/lib/Files/PreviewPlugin.php - About 2 hrs to fix

                  Method fopen has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function fopen($path, $mode) {
                          $pos = \strrpos($path, '.');
                          if ($pos !== false) {
                              $ext = \substr($path, $pos);
                          } else {
                  Severity: Major
                  Found in apps/files_external/lib/Lib/Storage/Google.php - About 2 hrs to fix

                    Method findInvalidShareOwner has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function findInvalidShareOwner(InputInterface $input, OutputInterface $output, $fix, $scopeUid) {
                            $output->writeln([
                                "<info>==========================</info>",
                                "<info>Searching for shares that have invalid uid_owner, meaning share uid_owner that does not match associated file storage id.</info>",
                                "<info>==========================</info>",
                    Severity: Major
                    Found in apps/files/lib/Command/TroubleshootTransferOwnership.php - About 2 hrs to fix

                      Method getFileInfo has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getFileInfo($path, $includeMountPoints = true) {
                              $this->assertPathLength($path);
                              if (!Filesystem::isValidPath($path)) {
                                  return false;
                              }
                      Severity: Major
                      Found in lib/private/Files/View.php - About 2 hrs to fix

                        Method updateForRecipient has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function updateForRecipient(\OCP\Share\IShare $share, $recipient) {
                                if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
                                    if ($share->getSharedWith() !== $recipient) {
                                        throw new ProviderException('Recipient does not match');
                                    }
                        Severity: Major
                        Found in lib/private/Share20/DefaultShareProvider.php - About 2 hrs to fix

                          Method getAllowedCorsHeaders has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private static function getAllowedCorsHeaders(\OCP\IConfig $config = null) {
                                  if ($config === null) {
                                      $config = \OC::$server->getConfig();
                                  }
                                  $allowedDefaultHeaders = [
                          Severity: Major
                          Found in lib/private/legacy/response.php - About 2 hrs to fix

                            Method loadRoutes has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function loadRoutes($app = null) {
                                    if (\is_string($app)) {
                                        $app = \OC_App::cleanAppId($app);
                                    }
                            
                            
                            Severity: Major
                            Found in lib/private/Route/Router.php - About 2 hrs to fix

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

                                  protected function configure() {
                                      $this
                                          ->setName('db:convert-type')
                                          ->setDescription('Convert the ownCloud database to the newly configured one. This feature is currently experimental.')
                                          ->addArgument(
                              Severity: Major
                              Found in core/Command/Db/ConvertType.php - About 2 hrs to fix

                                File JobList.php has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                /**
                                 * @author Joas Schilling <coding@schilljs.com>
                                 * @author Morris Jobke <hey@morrisjobke.de>
                                 * @author Robin Appelman <icewind@owncloud.com>
                                Severity: Minor
                                Found in lib/private/BackgroundJob/JobList.php - About 2 hrs to fix

                                  Storage has 21 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Storage extends DAV implements ISharedStorage {
                                      /** @var string */
                                      private $remoteUser;
                                      /** @var string */
                                      private $remote;
                                  Severity: Minor
                                  Found in apps/files_sharing/lib/External/Storage.php - About 2 hrs to fix

                                    Share20OcsController has 21 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class Share20OcsController extends OCSController {
                                        /** @var IManager */
                                        private $shareManager;
                                        /** @var IGroupManager */
                                        private $groupManager;
                                    Severity: Minor
                                    Found in apps/files_sharing/lib/Controller/Share20OcsController.php - About 2 hrs to fix

                                      Calendar has 21 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
                                          public function __construct(BackendInterface $caldavBackend, $calendarInfo, IL10N $l10n) {
                                              parent::__construct($caldavBackend, $calendarInfo);
                                      
                                              if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
                                      Severity: Minor
                                      Found in apps/dav/lib/CalDAV/Calendar.php - About 2 hrs to fix

                                        Checker has 21 functions (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        class Checker {
                                            public const CACHE_KEY = 'oc.integritycheck.checker';
                                            /** @var EnvironmentHelper */
                                            private $environmentHelper;
                                            /** @var AppLocator */
                                        Severity: Minor
                                        Found in lib/private/IntegrityCheck/Checker.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language