Skip to content

Commit

Permalink
Remove modern PHP syntax, and apply codesniffer fixes in Share20/Mana…
Browse files Browse the repository at this point in the history
…ger.php

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Feb 22, 2024
1 parent 0a43593 commit 2155281
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
* This class is the communication hub for all sharing related operations.
*/
class Manager implements IManager {

/** @var IProviderFactory */
private $factory;
private LoggerInterface $logger;
Expand Down Expand Up @@ -669,7 +668,6 @@ protected function linkCreateChecks(IShare $share) {
* @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();
Expand Down Expand Up @@ -1566,7 +1564,7 @@ protected function checkShare(IShare $share): void {
$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'));
}
}
Expand Down

0 comments on commit 2155281

Please sign in to comment.