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

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2023-09-07 17:13:37 +02:00 committed by Andy Scherzinger
parent 0ee5c61eae
commit 1fb72e8277

View file

@ -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;
/** @var ILogger */
@ -669,7 +668,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();
@ -1534,7 +1532,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'));
}
}