summaryrefslogtreecommitdiffstats
path: root/lib/Search
diff options
context:
space:
mode:
authorHamid Dehnavi <hamid.dev.pro@gmail.com>2023-07-10 23:12:51 +0330
committerHamid Dehnavi <hamid.dev.pro@gmail.com>2023-07-10 23:12:51 +0330
commitda1ff81556c6f0983d201efbe5343ed9b4ba8b7b (patch)
treeb80d30bde1c95f94740bf5f41d303e101e803004 /lib/Search
parent4205596c7b61caa68170dcae0d920d1af453a316 (diff)
Use PHP8's constructor property promotion
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'lib/Search')
-rw-r--r--lib/Search/ConversationSearch.php16
-rw-r--r--lib/Search/MessageSearch.php28
2 files changed, 11 insertions, 33 deletions
diff --git a/lib/Search/ConversationSearch.php b/lib/Search/ConversationSearch.php
index ae050da68..0e3dbc688 100644
--- a/lib/Search/ConversationSearch.php
+++ b/lib/Search/ConversationSearch.php
@@ -38,21 +38,13 @@ use OCP\Search\SearchResult;
use OCP\Search\SearchResultEntry;
class ConversationSearch implements IProvider {
- protected AvatarService $avatarService;
- protected Manager $manager;
- protected IURLGenerator $url;
- protected IL10N $l;
public function __construct(
- AvatarService $avatarService,
- Manager $manager,
- IURLGenerator $url,
- IL10N $l,
+ protected AvatarService $avatarService,
+ protected Manager $manager,
+ protected IURLGenerator $url,
+ protected IL10N $l,
) {
- $this->avatarService = $avatarService;
- $this->manager = $manager;
- $this->url = $url;
- $this->l = $l;
}
/**
diff --git a/lib/Search/MessageSearch.php b/lib/Search/MessageSearch.php
index 3320ec499..5d687479b 100644
--- a/lib/Search/MessageSearch.php
+++ b/lib/Search/MessageSearch.php
@@ -44,30 +44,16 @@ use OCP\Search\SearchResult;
use OCP\Search\SearchResultEntry;
class MessageSearch implements IProvider {
- protected RoomManager $roomManager;
- protected ParticipantService $participantService;
- protected ChatManager $chatManager;
- protected MessageParser $messageParser;
- protected ITimeFactory $timeFactory;
- protected IURLGenerator $url;
- protected IL10N $l;
public function __construct(
- RoomManager $roomManager,
- ParticipantService $participantService,
- ChatManager $chatManager,
- MessageParser $messageParser,
- ITimeFactory $timeFactory,
- IURLGenerator $url,
- IL10N $l,
+ protected RoomManager $roomManager,
+ protected ParticipantService $participantService,
+ protected ChatManager $chatManager,
+ protected MessageParser $messageParser,
+ protected ITimeFactory $timeFactory,
+ protected IURLGenerator $url,
+ protected IL10N $l,
) {
- $this->roomManager = $roomManager;
- $this->participantService = $participantService;
- $this->chatManager = $chatManager;
- $this->messageParser = $messageParser;
- $this->timeFactory = $timeFactory;
- $this->url = $url;
- $this->l = $l;
}
/**