owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $appName,
        IRequest $request,
        OcmMiddleware $ocmMiddleware,
        IURLGenerator $urlGenerator,
        IUserManager $userManager,
Severity: Major
Found in apps/federatedfilesharing/lib/Controller/OcmController.php - About 1 hr to fix

    Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            $appName,
            IRequest $request,
            IJobList $jobList,
            ISecureRandom $secureRandom,
            IConfig $config,
    Severity: Major
    Found in apps/updatenotification/lib/Controller/AdminController.php - About 1 hr to fix

      Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $appName,
              IRequest $request,
              IURLGenerator $urlGenerator,
              IL10N $l10n,
              IConfig $config,
      Severity: Major
      Found in apps/files/lib/Controller/ViewController.php - About 1 hr to fix

        Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                IRequest $request,
                ControllerMethodReflector $reflector,
                INavigationManager $navigationManager,
                IURLGenerator $urlGenerator,
                ILogger $logger,
        Severity: Major
        Found in lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php - About 1 hr to fix

          Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  IUserManager $manager,
                  ISession $session,
                  ITimeFactory $timeFactory,
                  IProvider $tokenProvider,
                  IConfig $config,
          Severity: Major
          Found in lib/private/User/Session.php - About 1 hr to fix

            Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    $appName,
                    IRequest $request,
                    IUserManager $userManager,
                    IConfig $config,
                    ISession $session,
            Severity: Major
            Found in core/Controller/LoginController.php - About 1 hr to fix

              Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      $appName,
                      IRequest $request,
                      IAvatarManager $avatarManager,
                      File $cache,
                      IL10N $l10n,
              Severity: Major
              Found in core/Controller/AvatarController.php - About 1 hr to fix

                Function _addAppPassword has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        _addAppPassword: function() {
                            var _this = this;
                
                            var deviceName = this._tokenName.val();
                            if (!deviceName) {
                Severity: Minor
                Found in settings/js/panels/authtoken_view.js - About 1 hr to fix

                  Function getDefaultFileActions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                           getDefaultFileActions: function(mime, type, permissions) {
                              var mimePart;
                              if (mime) {
                                  mimePart = mime.substr(0, mime.indexOf('/'));
                              }
                  Severity: Minor
                  Found in apps/files/js/fileactions.js - About 1 hr to fix

                    Function uploads has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            selection.uploads = _.filter(selection.uploads, function(upload) {
                                var file = upload.getFile();
                                if (file.relativePath) {
                                    // can't check in subfolder contents, let backend handle this
                                    return true;
                    Severity: Minor
                    Found in apps/files/js/file-upload.js - About 1 hr to fix

                      Function _legacyFillCurrentShares has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              _legacyFillCurrentShares: function(shares) {
                                  var fileId = this.fileInfoModel.get('id');
                                  if (!shares || !shares.length) {
                                      delete OC.Share.statuses[fileId];
                                      OC.Share.currentShares = {};
                      Severity: Minor
                      Found in core/js/shareitemmodel.js - About 1 hr to fix

                        Function _handleAddShareAttributes has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                _handleAddShareAttributes: function(properties, options) {
                                    var shareAttributesV1 = [];
                                    var filteredRegisteredAttributes = this._filterRegisteredAttributes(properties.permissions);
                                    _.map(filteredRegisteredAttributes, function (filteredRegisteredAttribute) {
                                        var isCompatible = true;
                        Severity: Minor
                        Found in core/js/shareitemmodel.js - About 1 hr to fix

                          Function renderFileResult has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      this.renderFileResult = function($row, result) {
                                          if (inFileList($row, result)) {
                                              return null;
                                          }
                                          hideNoFilterResults();
                          Severity: Minor
                          Found in apps/files/js/search.js - About 1 hr to fix

                            Function getFileInfo has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    getFileInfo: function(path, options) {
                                        if (!path) {
                                            path = '';
                                        }
                                        options = options || {};
                            Severity: Minor
                            Found in core/js/files/client.js - About 1 hr to fix

                              Method generateTokenAndSendMail has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function generateTokenAndSendMail($userId, $email) {
                                      $token = $this->secureRandom->generate(
                                          21,
                                          ISecureRandom::CHAR_DIGITS,
                                          ISecureRandom::CHAR_LOWER,
                              Severity: Minor
                              Found in settings/Controller/UsersController.php - About 1 hr to fix

                                Method notifyPublicLinkRecipientsByEmail has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function notifyPublicLinkRecipientsByEmail($link, $recipients, $personalNote) {
                                        # verify that the link is for a trusted domain
                                        if (!$this->trustedDomainHelper->isUrlTrusted($link)) {
                                            return new Result(null, 400, "Invalid shared link");
                                        }
                                Severity: Minor
                                Found in apps/files_sharing/lib/Controller/NotificationController.php - About 1 hr to fix

                                  Method createComment has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function createComment($objectType, $objectId, $data, $contentType = 'application/json') {
                                          if (\explode(';', $contentType)[0] === 'application/json') {
                                              $data = \json_decode($data, true);
                                          } else {
                                              throw new UnsupportedMediaType();
                                  Severity: Minor
                                  Found in apps/comments/lib/Dav/CommentsPlugin.php - About 1 hr to fix

                                    Method createShareObject has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function createShareObject($data) {
                                            $share = new Share($this->rootFolder, $this->userManager);
                                            $share->setId($data['id'])
                                                ->setShareType((int)$data['share_type'])
                                                ->setPermissions((int)$data['permissions'])
                                    Severity: Minor
                                    Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 1 hr to fix

                                      Method getUsersGroups has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getUsersGroups($parameters) {
                                              // Check if user is logged in
                                              $loggedInUser = $this->userSession->getUser();
                                              if ($loggedInUser === null) {
                                                  return new Result(null, API::RESPOND_UNAUTHORISED);
                                      Severity: Minor
                                      Found in apps/provisioning_api/lib/Users.php - About 1 hr to fix

                                        Method update has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function update($name, $userVisible, $userAssignable, $userEditable = false) {
                                                try {
                                                    if (!$this->tagManager->canUserSeeTag($this->tag, $this->user)) {
                                                        throw new NotFound('Tag with id ' . $this->tag->getId() . ' does not exist');
                                                    }
                                        Severity: Minor
                                        Found in apps/dav/lib/SystemTag/SystemTagNode.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language