chore: Remove PHP8 constructor property promotions

25 supports 7.4

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/44309/head
Côme Chilliet 2 months ago
parent d18b92100d
commit 43865acdd4
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A

@ -37,15 +37,30 @@ use Sabre\DAV\Exception\NotFound;
* Mapping node for system tag to object id * Mapping node for system tag to object id
*/ */
class SystemTagMappingNode implements \Sabre\DAV\INode { class SystemTagMappingNode implements \Sabre\DAV\INode {
private ISystemTag $tag;
private string $objectId;
private string $objectType;
private IUser $user;
private ISystemTagManager $tagManager;
private ISystemTagObjectMapper $tagMapper;
private \Closure $childWriteAccessFunction;
public function __construct( public function __construct(
private ISystemTag $tag, ISystemTag $tag,
private string $objectId, string $objectId,
private string $objectType, string $objectType,
private IUser $user, IUser $user,
private ISystemTagManager $tagManager, ISystemTagManager $tagManager,
private ISystemTagObjectMapper $tagMapper, ISystemTagObjectMapper $tagMapper,
private \Closure $childWriteAccessFunction, \Closure $childWriteAccessFunction
) { ) {
$this->tag = $tag;
$this->objectId = $objectId;
$this->objectType = $objectType;
$this->user = $user;
$this->tagManager = $tagManager;
$this->tagMapper = $tagMapper;
$this->childWriteAccessFunction = $childWriteAccessFunction;
} }
/** /**

@ -40,14 +40,27 @@ use Sabre\DAV\ICollection;
* Collection containing tags by object id * Collection containing tags by object id
*/ */
class SystemTagsObjectMappingCollection implements ICollection { class SystemTagsObjectMappingCollection implements ICollection {
private string $objectId;
private string $objectType;
private IUser $user;
private ISystemTagManager $tagManager;
private ISystemTagObjectMapper $tagMapper;
protected \Closure $childWriteAccessFunction;
public function __construct( public function __construct(
private string $objectId, string $objectId,
private string $objectType, string $objectType,
private IUser $user, IUser $user,
private ISystemTagManager $tagManager, ISystemTagManager $tagManager,
private ISystemTagObjectMapper $tagMapper, ISystemTagObjectMapper $tagMapper,
protected \Closure $childWriteAccessFunction, \Closure $childWriteAccessFunction
) { ) {
$this->objectId = $objectId;
$this->objectType = $objectType;
$this->user = $user;
$this->tagManager = $tagManager;
$this->tagMapper = $tagMapper;
$this->childWriteAccessFunction = $childWriteAccessFunction;
} }
public function createFile($name, $data = null) { public function createFile($name, $data = null) {

@ -38,15 +38,30 @@ use Sabre\DAV\ICollection;
* Collection containing object ids by object type * Collection containing object ids by object type
*/ */
class SystemTagsObjectTypeCollection implements ICollection { class SystemTagsObjectTypeCollection implements ICollection {
private string $objectType;
private ISystemTagManager $tagManager;
private ISystemTagObjectMapper $tagMapper;
private IUserSession $userSession;
private IGroupManager $groupManager;
protected \Closure $childExistsFunction;
protected \Closure $childWriteAccessFunction;
public function __construct( public function __construct(
private string $objectType, string $objectType,
private ISystemTagManager $tagManager, ISystemTagManager $tagManager,
private ISystemTagObjectMapper $tagMapper, ISystemTagObjectMapper $tagMapper,
private IUserSession $userSession, IUserSession $userSession,
private IGroupManager $groupManager, IGroupManager $groupManager,
protected \Closure $childExistsFunction, \Closure $childExistsFunction,
protected \Closure $childWriteAccessFunction, \Closure $childWriteAccessFunction
) { ) {
$this->objectType = $objectType;
$this->tagManager = $tagManager;
$this->tagMapper = $tagMapper;
$this->userSession = $userSession;
$this->groupManager = $groupManager;
$this->childExistsFunction = $childExistsFunction;
$this->childWriteAccessFunction = $childWriteAccessFunction;
} }
/** /**

Loading…
Cancel
Save