owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method insert has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function insert($file, array $data) {
        // normalize file
        $file = $this->normalize($file);

        if (isset($this->partial[$file])) { //add any saved partial data
Severity: Minor
Found in lib/private/Files/Cache/Cache.php - About 1 hr to fix

    Method normalizePath has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false, $keepUnicode = false) {
            if (self::$normalizedPathCache === null) {
                self::$normalizedPathCache = new CappedMemoryCache();
            }
    
    
    Severity: Minor
    Found in lib/private/Files/Filesystem.php - About 1 hr to fix

      Method verifyAppSignature has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function verifyAppSignature($appId, $path = '', $force = false) {
              try {
                  if ($path === '') {
                      $path = $this->appLocator->getAppPath($appId);
                  }
      Severity: Minor
      Found in lib/private/IntegrityCheck/Checker.php - About 1 hr to fix

        Method __construct has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function __construct($storage, $isAvailable = true) {
                if ($storage instanceof \OC\Files\Storage\Storage) {
                    $this->storageId = $storage->getId();
                } else {
                    $this->storageId = $storage;
        Severity: Minor
        Found in lib/private/Files/Cache/Storage.php - About 1 hr to fix

          Method tagAs has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function tagAs($objid, $tag) {
                  if (\is_string($tag) && !\is_numeric($tag)) {
                      $tag = \trim($tag);
                      if ($tag === '') {
                          \OCP\Util::writeLog('core', __METHOD__.', Cannot add an empty tag', \OCP\Util::DEBUG);
          Severity: Minor
          Found in lib/private/Tags.php - About 1 hr to fix

            Method oldDatabaseTables has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function oldDatabaseTables() {
                    return [
                        'calendar_calendars',
                        'calendar_objects',
                        'calendar_share_calendar',
            Severity: Minor
            Found in lib/private/Repair/DropOldTables.php - About 1 hr to fix

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

                  private function changeSchema(Schema $schema, array $options) {
                      $prefix = $options['tablePrefix'];
                      if ($schema->hasTable("{$prefix}jobs")) {
                          $jobsTable = $schema->getTable("{$prefix}jobs");
              
              
              Severity: Minor
              Found in lib/private/Repair/Apps.php - About 1 hr to fix

                Method processOCS has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function processOCS(array $routes) {
                        $ocsRoutes = isset($routes['ocs']) ? $routes['ocs'] : [];
                        foreach ($ocsRoutes as $ocsRoute) {
                            $name = $ocsRoute['name'];
                            $postFix = '';
                Severity: Minor
                Found in lib/private/AppFramework/Routing/RouteConfig.php - About 1 hr to fix

                  Method executeController has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function executeController($controller, $methodName) {
                          $arguments = [];
                  
                          // valid types that will be casted
                          $types = ['int', 'integer', 'bool', 'boolean', 'float'];
                  Severity: Minor
                  Found in lib/private/AppFramework/Http/Dispatcher.php - About 1 hr to fix

                    Method updateApp has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function updateApp($appId) {
                            \OC::$server->getAppManager()->clearAppsCache();
                            $appPath = self::getAppPath($appId);
                            if ($appPath === false) {
                                return false;
                    Severity: Minor
                    Found in lib/private/legacy/app.php - About 1 hr to fix

                      Method checkAppForUser has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function checkAppForUser($enabled, $appName, $user) {
                              if ($user !== null) {
                                  $userAppAttributes = $user->getExtendedAttributes();
                                  /**
                                   * Guests will only have access to some whitelisted apps
                      Severity: Minor
                      Found in lib/private/App/AppManager.php - About 1 hr to fix

                        Method needUpgrade has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function needUpgrade(\OCP\IConfig $config) {
                                if ($config->getSystemValue('installed', false)) {
                                    $installedVersion = $config->getSystemValue('version', '0.0.0');
                                    $currentVersion = \implode('.', \OCP\Util::getVersion());
                                    $versionDiff = \version_compare($currentVersion, $installedVersion);
                        Severity: Minor
                        Found in lib/private/legacy/util.php - About 1 hr to fix

                          Method l has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function l($type, $data = null, $options = []) {
                                  // Use the language of the instance
                                  $locale = $this->getLanguageCode();
                                  if ($locale === 'sr@latin') {
                                      $locale = 'sr_latn';
                          Severity: Minor
                          Found in lib/private/L10N/L10N.php - About 1 hr to fix

                            Method delete has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function delete($id) {
                                    return $this->emittingCall(function () use (&$id) {
                                        if (!\is_string($id)) {
                                            throw new \InvalidArgumentException('Parameter must be string');
                                        }
                            Severity: Minor
                            Found in lib/private/Comments/Manager.php - About 1 hr to fix

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

                                  protected function execute(InputInterface $input, OutputInterface $output): int {
                                      if (Filesystem::isPrimaryObjectStorageEnabled() === true) {
                                          $output->writeln('<info>We detected that the instance is running on a S3 primary object storage, user directories count might not be accurate</info>');
                                      }
                              
                              
                              Severity: Minor
                              Found in core/Command/User/Report.php - About 1 hr to fix

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

                                    protected function execute(InputInterface $input, OutputInterface $output): int {
                                        if ($this->encryptionManager->isEnabled() === false) {
                                            throw new \Exception('Server side encryption is not enabled');
                                        }
                                        $yes = $input->getOption('yes');
                                Severity: Minor
                                Found in core/Command/Encryption/EncryptAll.php - About 1 hr to fix

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

                                      protected function execute(InputInterface $input, OutputInterface $output): int {
                                          $user = $this->getUser($input);
                                          $userId = $user->getUID();
                                          $oldHome = $user->getHome();
                                  
                                  
                                  Severity: Minor
                                  Found in core/Command/User/MoveHome.php - About 1 hr to fix

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

                                        protected function execute(InputInterface $input, OutputInterface $output): int {
                                            $path = $input->getOption('path');
                                            $privateKeyPath = $input->getOption('privateKey');
                                            $keyBundlePath = $input->getOption('certificate');
                                            if ($path === null || $privateKeyPath === null || $keyBundlePath === null) {
                                    Severity: Minor
                                    Found in core/Command/Integrity/SignApp.php - About 1 hr to fix

                                      Method getAvatar has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getAvatar($userId, $size) {
                                              if ($size > 2048) {
                                                  $size = 2048;
                                              } elseif ($size <= 0) {
                                                  $size = 64;
                                      Severity: Minor
                                      Found in core/Controller/AvatarController.php - About 1 hr to fix

                                        Function writeParameterInput has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            writeParameterInput: function($td, parameter, placeholder, classes) {
                                                var hasFlag = function(flag) {
                                                    return (placeholder.flags & flag) === flag;
                                                };
                                                classes = $.isArray(classes) ? classes : [];
                                        Severity: Minor
                                        Found in apps/files_external/js/settings.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language