Remove modern PHP syntax, and apply codesniffer fixes in Share20/Manager.php

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/43748/head
Côme Chilliet 9 months ago committed by backportbot[bot]
parent 92862be923
commit 6e6797b593

@ -82,7 +82,6 @@ use Symfony\Component\EventDispatcher\GenericEvent;
* This class is the communication hub for all sharing related operations.
*/
class Manager implements IManager {
/** @var IProviderFactory */
private $factory;
private LoggerInterface $logger;
@ -668,7 +667,6 @@ class Manager implements IManager {
* @param IShare $share
*/
protected function setLinkParent(IShare $share) {
// No sense in checking if the method is not there.
if (method_exists($share, 'setParent')) {
$storage = $share->getNode()->getStorage();
@ -1565,7 +1563,7 @@ class Manager implements IManager {
$uids = array_unique([$share->getShareOwner(),$share->getSharedBy()]);
foreach ($uids as $uid) {
$user = $this->userManager->get($uid);
if ($user?->isEnabled() === false) {
if (($user !== null) && ($user->isEnabled() === false)) {
throw new ShareNotFound($this->l->t('The requested share comes from a disabled user'));
}
}

Loading…
Cancel
Save