owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

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

    public function __construct($options) {
        $this->memcacheFactory = \OC::$server->getMemCacheFactory();
        $this->httpClient = \OC::$server->getHTTPClientService();
        $this->logger = \OC::$server->getLogger();
        $this->config = \OC::$server->getConfig();
Severity: Minor
Found in apps/files_sharing/lib/External/Storage.php - About 1 hr to fix

    Method changePersonalPassword has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function changePersonalPassword($args) {
            // Check if we are an user
            \OC_JSON::callCheck();
            \OC_JSON::checkLoggedIn();
    
    
    Severity: Minor
    Found in settings/ChangePassword/Controller.php - About 1 hr to fix

      Method syncThemAll has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function syncThemAll(\Closure $callback) {
              $trustedServers = $this->dbHandler->getAllServer();
              foreach ($trustedServers as $trustedServer) {
                  $url = $trustedServer['url'];
                  $callback($url, null);
      Severity: Minor
      Found in apps/federation/lib/SyncFederationAddressBooks.php - About 1 hr to fix

        Method run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function run($argument) {
                //Current time
                $today = new \DateTime("today");
                $today = $today->format('Y-m-d H:i:s');
        
        
        Severity: Minor
        Found in apps/files_sharing/lib/ExpireSharesJob.php - About 1 hr to fix

          Method copy_recursive has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private static function copy_recursive($source, $destination, View $view) {
                  $size = 0;
                  if ($view->is_dir($source)) {
                      $view->mkdir($destination);
                      $view->touch($destination, $view->filemtime($source));
          Severity: Minor
          Found in apps/files_trashbin/lib/Trashbin.php - About 1 hr to fix

            Method getDavPermissions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getDavPermissions() {
                    $p = '';
                    if ($this->info->isShared()) {
                        $p .= 'S';
                    }
            Severity: Minor
            Found in apps/dav/lib/Connector/Sabre/Node.php - About 1 hr to fix

              Method getAccepted has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getAccepted($remote, $shareWith) {
                      $event = $this->eventDispatcher->dispatch(
                          new GenericEvent('', ['remote' => $remote]),
                          'remoteshare.received'
                      );
              Severity: Minor
              Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 1 hr to fix

                Method lock has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function lock($uri, Locks\LockInfo $lockInfo) {
                        if ($this->isPublicEndpoint) {
                            throw new Forbidden('Forbidden to lock from public endpoint');
                        }
                        try {
                Severity: Minor
                Found in apps/dav/lib/Files/FileLocksBackend.php - About 1 hr to fix

                  Method setName has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function setName($name) {
                          $mountPoint = $this->info->getMountPoint();
                          // rename of a shared mount should always be possible
                          if (!($mountPoint instanceof SharedMount) && !$this->info->isUpdateable()) {
                              throw new \Sabre\DAV\Exception\Forbidden();
                  Severity: Minor
                  Found in apps/dav/lib/Connector/Sabre/Node.php - About 1 hr to fix

                    Method updateCalendar has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function updateCalendar($calendarId, PropPatch $propPatch) {
                            $supportedProperties = \array_keys($this->propertyMap);
                            $supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
                    
                            $propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) {
                    Severity: Minor
                    Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 1 hr to fix

                      Method syncRemoteAddressBook has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function syncRemoteAddressBook($url, $userName, $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetProperties) {
                              // 1. create addressbook
                              $book = $this->ensureSystemAddressBookExists($targetPrincipal, $targetBookId, $targetProperties);
                              $addressBookId = $book['id'];
                      
                      
                      Severity: Minor
                      Found in apps/dav/lib/CardDAV/SyncService.php - About 1 hr to fix

                        Method updateAddressBook has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) {
                                $supportedProperties = [
                                    '{DAV:}displayname',
                                    '{' . Plugin::NS_CARDDAV . '}addressbook-description',
                                ];
                        Severity: Minor
                        Found in apps/dav/lib/CardDAV/CardDavBackend.php - About 1 hr to fix

                          Method deleteCard has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function deleteCard($addressBookId, $cardUri) {
                                  try {
                                      $cardId = $this->getCardId($addressBookId, $cardUri);
                                  } catch (\InvalidArgumentException $e) {
                                      $cardId = null;
                          Severity: Minor
                          Found in apps/dav/lib/CardDAV/CardDavBackend.php - About 1 hr to fix

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

                                public static function delete($path) {
                                    $deletedFile = self::$deletedFiles[$path];
                                    $uid = $deletedFile['uid'];
                                    $filename = $deletedFile['filename'];
                            
                            
                            Severity: Minor
                            Found in apps/files_versions/lib/Storage.php - About 1 hr to fix

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

                                  public function __construct(array $urlParams = []) {
                                      parent::__construct('files_versions', $urlParams);
                              
                                      $container = $this->getContainer();
                              
                              
                              Severity: Minor
                              Found in apps/files_versions/lib/AppInfo/Application.php - About 1 hr to fix

                                Method adjustShareOwner has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    protected function adjustShareOwner($shareId, $shareType, $newUidOwner) {
                                        $query = $this->connection->getQueryBuilder();
                                
                                        $query->update('share')
                                            ->set('uid_owner', $query->createParameter('uid_owner'))
                                Severity: Minor
                                Found in apps/files/lib/Command/TroubleshootTransferOwnership.php - About 1 hr to fix

                                  Method userScan has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function userScan($users, $inputPath, $shouldRepairStoragesIndividually, $input, $output, $verbose) {
                                          $users_total = \count($users);
                                          $user_count = 0;
                                          foreach ($users as $user) {
                                              if (\is_object($user)) {
                                  Severity: Minor
                                  Found in apps/files/lib/Command/Scan.php - About 1 hr to fix

                                    Method checkConfig has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function checkConfig() {
                                            $l = \OC::$server->getL10N('lib');
                                    
                                            // Create config if it does not already exist
                                            $configFilePath = self::$configDir .'/config.php';
                                    Severity: Minor
                                    Found in lib/kernel.php - About 1 hr to fix

                                      Method getAllTags has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getAllTags($visibilityFilter = null, $nameSearchPattern = null) {
                                              $tags = [];
                                      
                                              $query = $this->connection->getQueryBuilder();
                                              $query->select('*')
                                      Severity: Minor
                                      Found in lib/private/SystemTag/SystemTagManager.php - About 1 hr to fix

                                        Method getCacheEntry has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function getCacheEntry($storage, $internalPath, $relativePath) {
                                                $cache = $storage->getCache($internalPath);
                                                $data = $cache->get($internalPath);
                                                $watcher = $storage->getWatcher($internalPath);
                                        
                                        
                                        Severity: Minor
                                        Found in lib/private/Files/View.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language