owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Function getShareeObject has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        getShareeObject: function(shareIndex) {
            var shareWith = this.model.getShareWith(shareIndex);
            var shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex);
            var shareType = this.model.getShareType(shareIndex);
            var shareWithAdditionalInfo = this.model.getShareWithAdditionalInfo(shareIndex);
Severity: Minor
Found in core/js/sharedialogshareelistview.js - About 1 hr to fix

    Function getShareeList has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            getShareeList: function() {
                var universal = {
                    avatarEnabled: this.configModel.areAvatarsEnabled(),
                    mailNotificationEnabled: this.configModel.isMailNotificationEnabled(),
                    notifyByMailLabel: t('core', 'notify by email'),
    Severity: Minor
    Found in core/js/sharedialogshareelistview.js - About 1 hr to fix

      Method isUsedTlsLibOutdated has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function isUsedTlsLibOutdated(): string {
              // Don't run check when:
              // 1. Server has `has_internet_connection` set to false
              // 2. App Store AND S2S is disabled
              if (!$this->config->getSystemValue('has_internet_connection', true)) {
      Severity: Minor
      Found in settings/Controller/CheckSetupController.php - About 1 hr to fix

        Method handleException has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function handleException($e) {
            $request = \OC::$server->getRequest();
            // in case the request content type is text/xml - we assume it's a WebDAV request
            $isXmlContentType = \strpos($request->getHeader('Content-Type') ?? '', 'text/xml');
            if ($isXmlContentType === 0) {
        Severity: Minor
        Found in remote.php - About 1 hr to fix

          Method doDelete has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function doDelete($path, $method) {
                  if (self::$disableTrash
                      || !\OC_App::isEnabled('files_trashbin')
                      || (\pathinfo($path, PATHINFO_EXTENSION) === 'part')
                      || $this->shouldMoveToTrash($path) === false
          Severity: Minor
          Found in apps/files_trashbin/lib/Storage.php - About 1 hr to fix

            Method registerService has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function registerService() {
                    $container = $this->getContainer();
            
                    $container->registerService('addServerMiddleware', function (IAppContainer $c) {
                        return new AddServerMiddleware(
            Severity: Minor
            Found in apps/federation/lib/AppInfo/Application.php - About 1 hr to fix

              Method getCalendarByUri has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getCalendarByUri($principal, $uri) {
                      $fields = \array_values($this->propertyMap);
                      $fields[] = 'id';
                      $fields[] = 'uri';
                      $fields[] = 'synctoken';
              Severity: Minor
              Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 1 hr to fix

                Method createCardsTable has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method displayPanel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function displayPanel() {
                          $lastUpdateCheck = $this->dateTimeFormatter->formatDateTime(
                              $this->config->getAppValue('core', 'lastupdatedat')
                          );
                  
                  
                  Severity: Minor
                  Found in apps/updatenotification/lib/Controller/AdminController.php - About 1 hr to fix

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

                        public function httpGet(RequestInterface $request, ResponseInterface $response) {
                            // Only handle valid files
                            $node = $this->tree->getNodeForPath($request->getPath());
                            if (!($node instanceof IFile)) {
                                return;
                    Severity: Minor
                    Found in apps/dav/lib/Connector/Sabre/FilesPlugin.php - About 1 hr to fix

                      Method getACL has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getACL() {
                              $acl =  [
                                  [
                                      'privilege' => '{DAV:}read',
                                      'principal' => $this->getOwner(),
                      Severity: Minor
                      Found in apps/dav/lib/CardDAV/AddressBook.php - About 1 hr to fix

                        Method handleGetProperties has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function handleGetProperties(
                                PropFind $propFind,
                                \Sabre\DAV\INode $sabreNode
                            ) {
                                if (!($sabreNode instanceof \OCA\DAV\Connector\Sabre\Node)) {
                        Severity: Minor
                        Found in apps/dav/lib/Connector/Sabre/SharesPlugin.php - About 1 hr to fix

                          Method formatFileInfo has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function formatFileInfo(FileInfo $i) {
                                  $entry = [];
                          
                                  $entry['id'] = $i['fileid'];
                                  $entry['parentId'] = $i['parent'];
                          Severity: Minor
                          Found in apps/files/lib/Helper.php - About 1 hr to fix

                            Method check has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function check() {
                                    // Look up the cache - it is invalidated all 30 minutes
                                    if (((int)$this->config->getAppValue('core', 'lastupdatedat') + 1800) > \time()) {
                                        return \json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
                                    }
                            Severity: Minor
                            Found in lib/private/Updater/VersionCheck.php - About 1 hr to fix

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

                                  public function __construct($prefix = '') {
                                      parent::__construct($prefix);
                                      if (self::$cache === null) {
                                          self::$cache = new \Memcached();
                              
                              
                              Severity: Minor
                              Found in lib/private/Memcache/Memcached.php - About 1 hr to fix

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

                                    public function __construct($params) {
                                        $this->statCache = new ArrayCache();
                                        $this->httpClientService = \OC::$server->getHTTPClientService();
                                        $this->webDavClientService = \OC::$server->getWebDavClientService();
                                        if (isset($params['host'], $params['user'], $params['password'])) {
                                Severity: Minor
                                Found in lib/private/Files/Storage/DAV.php - About 1 hr to fix

                                  Method renameFromStorage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function renameFromStorage(IStorage $sourceStorage, $source, $target) {
                                          if (!$this->enabled or Scanner::isPartialFile($source) or Scanner::isPartialFile($target)) {
                                              return;
                                          }
                                  
                                  
                                  Severity: Minor
                                  Found in lib/private/Files/Cache/Updater.php - About 1 hr to fix

                                    Method calculateFolderSize has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function calculateFolderSize($path, $entry = null) {
                                            $totalSize = 0;
                                            if ($entry === null or !isset($entry['fileid'])) {
                                                $entry = $this->get($path);
                                            }
                                    Severity: Minor
                                    Found in lib/private/Files/Cache/Cache.php - About 1 hr to fix

                                      Method touch has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function touch($path, $mtime = null) {
                                              if ($mtime === null) {
                                                  $mtime = \time();
                                              }
                                      
                                      
                                      Severity: Minor
                                      Found in lib/private/Files/ObjectStore/ObjectStoreStorage.php - About 1 hr to fix

                                        Method createSpecificUser has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function createSpecificUser($username, $connection) {
                                                try {
                                                    //user already specified in config
                                                    $oldUser = $this->config->getSystemValue('dbuser', false);
                                        
                                        
                                        Severity: Minor
                                        Found in lib/private/Setup/MySQL.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language