Skip to content

Commit

Permalink
refactor(shareManager): Use constructor property promotion
Browse files Browse the repository at this point in the history
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
  • Loading branch information
nfebe committed May 31, 2024
1 parent 63add0a commit 50dafc6
Showing 1 changed file with 4 additions and 46 deletions.
50 changes: 4 additions & 46 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,43 +85,9 @@
* This class is the communication hub for all sharing related operations.
*/
class Manager implements IManager {
/** @var IProviderFactory */
private $factory;
private LoggerInterface $logger;
/** @var IConfig */
private $config;
/** @var ISecureRandom */
private $secureRandom;
/** @var IHasher */
private $hasher;
/** @var IMountManager */
private $mountManager;
/** @var IGroupManager */
private $groupManager;
/** @var IL10N */
private $l;
/** @var IFactory */
private $l10nFactory;
/** @var IUserManager */
private $userManager;
/** @var IRootFolder */
private $rootFolder;
/** @var LegacyHooks */
private $legacyHooks;
/** @var IMailer */
private $mailer;
/** @var IURLGenerator */
private $urlGenerator;
/** @var \OC_Defaults */
private $defaults;
/** @var IEventDispatcher */
private $dispatcher;
/** @var IUserSession */
private $userSession;
/** @var KnownUserService */
private $knownUserService;
private ShareDisableChecker $shareDisableChecker;
private IDateTimeZone $dateTimeZone;

private IL10N|null $l;
private LegacyHooks $legacyHooks;

public function __construct(
LoggerInterface $logger,
Expand Down Expand Up @@ -157,15 +123,7 @@ public function __construct(
$this->rootFolder = $rootFolder;
// The constructor of LegacyHooks registers the listeners of share events
// do not remove if those are not properly migrated
$this->legacyHooks = new LegacyHooks($dispatcher);
$this->mailer = $mailer;
$this->urlGenerator = $urlGenerator;
$this->defaults = $defaults;
$this->dispatcher = $dispatcher;
$this->userSession = $userSession;
$this->knownUserService = $knownUserService;
$this->shareDisableChecker = $shareDisableChecker;
$this->dateTimeZone = $dateTimeZone;
$this->legacyHooks = new LegacyHooks($this->dispatcher);
}

/**
Expand Down

0 comments on commit 50dafc6

Please sign in to comment.