Skip to content

Commit 43865ac

Browse files
committed
chore: Remove PHP8 constructor property promotions
25 supports 7.4 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent d18b921 commit 43865ac

File tree

3 files changed

+63
-20
lines changed

3 files changed

+63
-20
lines changed

apps/dav/lib/SystemTag/SystemTagMappingNode.php

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,30 @@
3737
* Mapping node for system tag to object id
3838
*/
3939
class SystemTagMappingNode implements \Sabre\DAV\INode {
40+
private ISystemTag $tag;
41+
private string $objectId;
42+
private string $objectType;
43+
private IUser $user;
44+
private ISystemTagManager $tagManager;
45+
private ISystemTagObjectMapper $tagMapper;
46+
private \Closure $childWriteAccessFunction;
47+
4048
public function __construct(
41-
private ISystemTag $tag,
42-
private string $objectId,
43-
private string $objectType,
44-
private IUser $user,
45-
private ISystemTagManager $tagManager,
46-
private ISystemTagObjectMapper $tagMapper,
47-
private \Closure $childWriteAccessFunction,
49+
ISystemTag $tag,
50+
string $objectId,
51+
string $objectType,
52+
IUser $user,
53+
ISystemTagManager $tagManager,
54+
ISystemTagObjectMapper $tagMapper,
55+
\Closure $childWriteAccessFunction
4856
) {
57+
$this->tag = $tag;
58+
$this->objectId = $objectId;
59+
$this->objectType = $objectType;
60+
$this->user = $user;
61+
$this->tagManager = $tagManager;
62+
$this->tagMapper = $tagMapper;
63+
$this->childWriteAccessFunction = $childWriteAccessFunction;
4964
}
5065

5166
/**

apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,27 @@
4040
* Collection containing tags by object id
4141
*/
4242
class SystemTagsObjectMappingCollection implements ICollection {
43+
private string $objectId;
44+
private string $objectType;
45+
private IUser $user;
46+
private ISystemTagManager $tagManager;
47+
private ISystemTagObjectMapper $tagMapper;
48+
protected \Closure $childWriteAccessFunction;
49+
4350
public function __construct(
44-
private string $objectId,
45-
private string $objectType,
46-
private IUser $user,
47-
private ISystemTagManager $tagManager,
48-
private ISystemTagObjectMapper $tagMapper,
49-
protected \Closure $childWriteAccessFunction,
51+
string $objectId,
52+
string $objectType,
53+
IUser $user,
54+
ISystemTagManager $tagManager,
55+
ISystemTagObjectMapper $tagMapper,
56+
\Closure $childWriteAccessFunction
5057
) {
58+
$this->objectId = $objectId;
59+
$this->objectType = $objectType;
60+
$this->user = $user;
61+
$this->tagManager = $tagManager;
62+
$this->tagMapper = $tagMapper;
63+
$this->childWriteAccessFunction = $childWriteAccessFunction;
5164
}
5265

5366
public function createFile($name, $data = null) {

apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,30 @@
3838
* Collection containing object ids by object type
3939
*/
4040
class SystemTagsObjectTypeCollection implements ICollection {
41+
private string $objectType;
42+
private ISystemTagManager $tagManager;
43+
private ISystemTagObjectMapper $tagMapper;
44+
private IUserSession $userSession;
45+
private IGroupManager $groupManager;
46+
protected \Closure $childExistsFunction;
47+
protected \Closure $childWriteAccessFunction;
48+
4149
public function __construct(
42-
private string $objectType,
43-
private ISystemTagManager $tagManager,
44-
private ISystemTagObjectMapper $tagMapper,
45-
private IUserSession $userSession,
46-
private IGroupManager $groupManager,
47-
protected \Closure $childExistsFunction,
48-
protected \Closure $childWriteAccessFunction,
50+
string $objectType,
51+
ISystemTagManager $tagManager,
52+
ISystemTagObjectMapper $tagMapper,
53+
IUserSession $userSession,
54+
IGroupManager $groupManager,
55+
\Closure $childExistsFunction,
56+
\Closure $childWriteAccessFunction
4957
) {
58+
$this->objectType = $objectType;
59+
$this->tagManager = $tagManager;
60+
$this->tagMapper = $tagMapper;
61+
$this->userSession = $userSession;
62+
$this->groupManager = $groupManager;
63+
$this->childExistsFunction = $childExistsFunction;
64+
$this->childWriteAccessFunction = $childWriteAccessFunction;
5065
}
5166

5267
/**

0 commit comments

Comments
 (0)