From b0c42e4cd7d51148a55fbff9113688b97b38c965 Mon Sep 17 00:00:00 2001 From: Marco Nassabain Date: Fri, 5 Mar 2021 23:10:17 +0100 Subject: =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Item:=20Remove=20isShared?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marco Nassabain --- lib/Db/Item.php | 8 +------- tests/Unit/Db/ItemTest.php | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/Db/Item.php b/lib/Db/Item.php index 411428e96..7bb9147b5 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -311,11 +311,6 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this->starred; } - public function isShared(): bool - { - return !is_null($this->getSharedBy()); - } - public function isUnread(): bool { return $this->unread; @@ -369,8 +364,7 @@ class Item extends Entity implements IAPI, \JsonSerializable 'intro' => $this->getIntro(), 'fingerprint' => $this->getFingerprint(), 'categories' => $this->getCategories(), - 'sharedBy' => $this->getSharedBy(), - 'isShared' => $this->isShared() + 'sharedBy' => $this->getSharedBy() ]; } diff --git a/tests/Unit/Db/ItemTest.php b/tests/Unit/Db/ItemTest.php index faf924e46..289126e32 100644 --- a/tests/Unit/Db/ItemTest.php +++ b/tests/Unit/Db/ItemTest.php @@ -225,8 +225,7 @@ class ItemTest extends TestCase 'intro' => 'this is a test', 'fingerprint' => 'fingerprint', 'categories' => ['food'], - 'sharedBy' => 'jack', - 'isShared' => true, + 'sharedBy' => 'jack' ], $item->jsonSerialize() ); } -- cgit v1.2.3