From d6f5300bb2c8677c763097a2f26909f78d54fac6 Mon Sep 17 00:00:00 2001 From: Rafael Horvat Date: Thu, 20 Apr 2023 15:08:18 +0200 Subject: [PATCH] Change some methods from private to protected, to be able to extend the affected classes --- extensions/tags/src/Content/Tag.php | 6 +++--- extensions/tags/src/Content/Tags.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/tags/src/Content/Tag.php b/extensions/tags/src/Content/Tag.php index 8451a0f76e..ab204c2cf9 100644 --- a/extensions/tags/src/Content/Tag.php +++ b/extensions/tags/src/Content/Tag.php @@ -113,7 +113,7 @@ public function __invoke(Document $document, Request $request) * * @return array */ - private function getSortMap() + protected function getSortMap() { return resolve('flarum.forum.discussions.sortmap'); } @@ -121,12 +121,12 @@ private function getSortMap() /** * Get the result of an API request to list discussions. */ - private function getApiDocument(Request $request, array $params) + protected function getApiDocument(Request $request, array $params) { return json_decode($this->api->withParentRequest($request)->withQueryParams($params)->get('/discussions')->getBody()); } - private function getTagsDocument(Request $request, string $slug) + protected function getTagsDocument(Request $request, string $slug) { return json_decode($this->api->withParentRequest($request)->withQueryParams([ 'include' => 'children,children.parent,parent,parent.children.parent,state' diff --git a/extensions/tags/src/Content/Tags.php b/extensions/tags/src/Content/Tags.php index a6c6523246..0f919e25df 100644 --- a/extensions/tags/src/Content/Tags.php +++ b/extensions/tags/src/Content/Tags.php @@ -100,7 +100,7 @@ public function __invoke(Document $document, Request $request) return $document; } - private function getTagsDocument(Request $request) + protected function getTagsDocument(Request $request) { return json_decode($this->api->withParentRequest($request)->withQueryParams([ 'include' => 'children,lastPostedDiscussion,parent'