owncloud/core

View on GitHub
lib/public/Share.php

Summary

Maintainability
C
1 day
Test Coverage

Share has 26 functions (exceeds 20 allowed). Consider refactoring.
Open

class Share extends \OC\Share\Constants {
    /**
     * Register a sharing backend class that implements OCP\Share_Backend for an item type
     * @param string $itemType Item type
     * @param string $class Backend class
Severity: Minor
Found in lib/public/Share.php - About 3 hrs to fix

    Method shareItem has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) {
    Severity: Major
    Found in lib/public/Share.php - About 1 hr to fix

      Method getItemsSharedWithUser has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $itemType,
              $user,
              $format = self::FORMAT_NONE,
              $parameters = null,
              $limit = -1,
      Severity: Minor
      Found in lib/public/Share.php - About 45 mins to fix

        Method getItemsShared has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $itemType,
                $format = self::FORMAT_NONE,
                $parameters = null,
                $limit = -1,
                $includeCollections = false
        Severity: Minor
        Found in lib/public/Share.php - About 35 mins to fix

          Method setPermissions has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static function setPermissions($itemType, $itemSource, $shareType, $shareWith, $permissions) {
          Severity: Minor
          Found in lib/public/Share.php - About 35 mins to fix

            Method getUsersItemShared has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static function getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections = false, $checkExpireDate = true) {
            Severity: Minor
            Found in lib/public/Share.php - About 35 mins to fix

              Method getItemSharedWith has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      $itemType,
                      $itemTarget,
                      $format = self::FORMAT_NONE,
                      $parameters = null,
                      $includeCollections = false
              Severity: Minor
              Found in lib/public/Share.php - About 35 mins to fix

                Method getItemShared has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        $itemType,
                        $itemSource,
                        $format = self::FORMAT_NONE,
                        $parameters = null,
                        $includeCollections = false
                Severity: Minor
                Found in lib/public/Share.php - About 35 mins to fix

                  Method unshare has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public static function unshare($itemType, $itemSource, $shareType, $shareWith, $owner = null) {
                  Severity: Minor
                  Found in lib/public/Share.php - About 35 mins to fix

                    Method setSendMailStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public static function setSendMailStatus($itemType, $itemSource, $shareType, $recipient, $status) {
                    Severity: Minor
                    Found in lib/public/Share.php - About 35 mins to fix

                      Method getItemSharedWithBySource has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              $itemType,
                              $itemSource,
                              $format = self::FORMAT_NONE,
                              $parameters = null,
                              $includeCollections = false
                      Severity: Minor
                      Found in lib/public/Share.php - About 35 mins to fix

                        Method getUsersSharingFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public static function getUsersSharingFile($path, $ownerUser, $includeOwner = false, $returnUserPaths = false, $recursive = true) {
                        Severity: Minor
                        Found in lib/public/Share.php - About 35 mins to fix

                          Method getItemsSharedWith has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  $itemType,
                                  $format = self::FORMAT_NONE,
                                  $parameters = null,
                                  $limit = -1,
                                  $includeCollections = false
                          Severity: Minor
                          Found in lib/public/Share.php - About 35 mins to fix

                            There are no issues that match your filters.

                            Category
                            Status