owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method stream_open has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function stream_open($path, $mode, $options, &$opened_path) {
        $context = $this->loadContext('ocencryption');

        $this->position = 0;
        $this->cache = '';
Severity: Minor
Found in lib/private/Files/Stream/Encryption.php - About 1 hr to fix

    Method emit_file_hooks_pre has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function emit_file_hooks_pre($exists, $path, &$run) {
            $event = new GenericEvent(null);
            if (!$exists) {
                \OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_create, [
                    Filesystem::signal_param_path => $this->getHookPath($path),
    Severity: Minor
    Found in lib/private/Files/View.php - About 1 hr to fix

      Method opendir has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function opendir($path) {
              $this->init();
              $path = $this->cleanPath($path);
              try {
                  // client propfind is in \OC\HTTP\Client
      Severity: Minor
      Found in lib/private/Files/Storage/DAV.php - About 1 hr to fix

        Method getMountsForUser has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getMountsForUser(IUser $user) {
                $loader = $this->loader;
                $mounts = \array_map(function (IMountProvider $provider) use ($user, $loader) {
                    return $provider->getMountsForUser($user, $loader);
                }, $this->providers);
        Severity: Minor
        Found in lib/private/Files/Config/MountProviderCollection.php - About 1 hr to fix

          Method mkdir has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function mkdir($path) {
                  $path = $this->normalizePath($path);
          
                  if ($this->file_exists($path)) {
                      return false;
          Severity: Minor
          Found in lib/private/Files/ObjectStore/ObjectStoreStorage.php - About 1 hr to fix

            Method getThumbnail has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getThumbnail(File $file, $maxX, $maxY, $scalingUp) {
                    $this->initCmd();
                    if ($this->cmd === null) {
                        return false;
                    }
            Severity: Minor
            Found in lib/private/Preview/Office.php - About 1 hr to fix

              Method dispatch has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function dispatch(Controller $controller, $methodName) {
                      $out = [null, [], null];
              
                      try {
                          // prefill reflector with everything thats needed for the
              Severity: Minor
              Found in lib/private/AppFramework/Http/Dispatcher.php - About 1 hr to fix

                Method getNext has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getNext() {
                        $query = $this->connection->getQueryBuilder();
                        $query->select('*')
                            ->from('jobs')
                            ->where($query->expr()->lte('reserved_at', $query->createNamedParameter($this->timeFactory->getTime() - 12 * 3600, IQueryBuilder::PARAM_INT)))
                Severity: Minor
                Found in lib/private/BackgroundJob/JobList.php - About 1 hr to fix

                  Method syncSingleUser has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function syncSingleUser(
                          InputInterface $input,
                          OutputInterface $output,
                          SyncService $syncService,
                          UserInterface $backend,
                  Severity: Minor
                  Found in core/Command/User/SyncBackend.php - About 1 hr to fix

                    Function saveStorageConfig has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        saveStorageConfig:function($tr, callback, concurrentTimer) {
                            var self = this;
                            var storage = this.getStorageConfig($tr);
                            if (!storage || !storage.validate()) {
                                return false;
                    Severity: Minor
                    Found in apps/files_external/js/settings.js - About 1 hr to fix

                      Function getMountPointList has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          getMountPointList: function (afterCallback) {
                              var self = this;
                              if (typeof afterCallback !== 'function' || self.isGetMountPointListRunning) {
                                  return;
                              }
                      Severity: Minor
                      Found in apps/files_external/js/statusmanager.js - About 1 hr to fix

                        Function parse has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                parse: function(data) {
                                    if(data === false) {
                                        console.warn('no data was returned');
                                        this.trigger('fetchError');
                                        return {};
                        Severity: Minor
                        Found in core/js/shareitemmodel.js - About 1 hr to fix

                          Method getSharedWithMe has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function getSharedWithMe($node, $includeTags, $requestedShareTypes, $stateFilter = 0) {
                                  // sharedWithMe is limited to user and group shares for compatibility.
                                  $shares = [];
                                  if (isset($requestedShareTypes[Share::SHARE_TYPE_USER]) && $requestedShareTypes[Share::SHARE_TYPE_USER]) {
                                      $shares = \array_merge(
                          Severity: Minor
                          Found in apps/files_sharing/lib/Controller/Share20OcsController.php - About 1 hr to fix

                            Method event has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function event(ManagerEvent $event) {
                                    $actor = $this->session->getUser();
                                    if ($actor instanceof IUser) {
                                        $actor = $actor->getUID();
                                    } else {
                            Severity: Minor
                            Found in apps/systemtags/lib/Activity/Listener.php - About 1 hr to fix

                              Method getAllSharesBy has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getAllSharesBy($userId, $shareTypes, $nodeIDs, $reshares) {
                                      $shares = [];
                              
                                      $qb = $this->dbConnection->getQueryBuilder();
                                      $qb->select('*')
                              Severity: Minor
                              Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 1 hr to fix

                                Method buildOCSResponse has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function buildOCSResponse($format, $data) {
                                        if ($data instanceof Result) {
                                            $headers = $data->getHeaders();
                                            $d = $data->getData();
                                            $data = $data->getMeta();
                                Severity: Minor
                                Found in lib/public/AppFramework/OCSController.php - About 1 hr to fix

                                  Method crashLog has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function crashLog(\Throwable $ex): void {
                                          $crashDir = self::$SERVERROOT . '/data';
                                          if (self::$config) {
                                              $dataDir = self::$config->getValue('datadirectory', self::$SERVERROOT . '/data');
                                              $crashDir = self::$config->getValue('crashdirectory', $dataDir);
                                  Severity: Minor
                                  Found in lib/kernel.php - About 1 hr to fix

                                    Method buildParts has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function buildParts(array $data) {
                                            $fields = [
                                                'path', 'parent', 'name', 'mimetype', 'size', 'mtime', 'storage_mtime', 'encrypted',
                                                'etag', 'permissions', 'checksum'];
                                    
                                    
                                    Severity: Minor
                                    Found in lib/private/Files/Cache/Cache.php - About 1 hr to fix

                                      Method populateStorageConfigWithLegacyOptions has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function populateStorageConfigWithLegacyOptions(
                                              &$storageConfig,
                                              $mountType,
                                              $applicable,
                                              $storageOptions
                                      Severity: Minor
                                      Found in lib/private/Files/External/Service/LegacyStoragesService.php - About 1 hr to fix

                                        Method checkLicenseFor has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function checkLicenseFor(string $appid, array $options = []): bool {
                                                $currentTime = $this->timeFactory->getTime();
                                        
                                                $gracePeriod = $this->config->getAppValue('core', 'grace_period', null);
                                                if ($gracePeriod === null) {
                                        Severity: Minor
                                        Found in lib/private/License/LicenseManager.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language