Skip to content

Commit

Permalink
chore: Remove PHP8 constructor property promotions
Browse files Browse the repository at this point in the history
25 supports 7.4

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc authored and backportbot[bot] committed Mar 19, 2024
1 parent b574861 commit a5ac6d9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 20 deletions.
29 changes: 22 additions & 7 deletions apps/dav/lib/SystemTag/SystemTagMappingNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,30 @@
* Mapping node for system tag to object id
*/
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(
private ISystemTag $tag,
private string $objectId,
private string $objectType,
private IUser $user,
private ISystemTagManager $tagManager,
private ISystemTagObjectMapper $tagMapper,
private \Closure $childWriteAccessFunction,
ISystemTag $tag,
string $objectId,
string $objectType,
IUser $user,
ISystemTagManager $tagManager,
ISystemTagObjectMapper $tagMapper,
\Closure $childWriteAccessFunction
) {
$this->tag = $tag;
$this->objectId = $objectId;
$this->objectType = $objectType;
$this->user = $user;
$this->tagManager = $tagManager;
$this->tagMapper = $tagMapper;
$this->childWriteAccessFunction = $childWriteAccessFunction;
}

/**
Expand Down
25 changes: 19 additions & 6 deletions apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,27 @@
* Collection containing tags by object id
*/
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(
private string $objectId,
private string $objectType,
private IUser $user,
private ISystemTagManager $tagManager,
private ISystemTagObjectMapper $tagMapper,
protected \Closure $childWriteAccessFunction,
string $objectId,
string $objectType,
IUser $user,
ISystemTagManager $tagManager,
ISystemTagObjectMapper $tagMapper,
\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) {
Expand Down
29 changes: 22 additions & 7 deletions apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,30 @@
* Collection containing object ids by object type
*/
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(
private string $objectType,
private ISystemTagManager $tagManager,
private ISystemTagObjectMapper $tagMapper,
private IUserSession $userSession,
private IGroupManager $groupManager,
protected \Closure $childExistsFunction,
protected \Closure $childWriteAccessFunction,
string $objectType,
ISystemTagManager $tagManager,
ISystemTagObjectMapper $tagMapper,
IUserSession $userSession,
IGroupManager $groupManager,
\Closure $childExistsFunction,
\Closure $childWriteAccessFunction
) {
$this->objectType = $objectType;
$this->tagManager = $tagManager;
$this->tagMapper = $tagMapper;
$this->userSession = $userSession;
$this->groupManager = $groupManager;
$this->childExistsFunction = $childExistsFunction;
$this->childWriteAccessFunction = $childWriteAccessFunction;
}

/**
Expand Down

0 comments on commit a5ac6d9

Please sign in to comment.