diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2020-11-20 20:52:54 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-03-25 18:47:38 +0100 |
commit | 2baa7a2b9136d4d4dc1e56dfc043cc71da3ee1df (patch) | |
tree | d8f970ce85442869ad9547f80f70153a31820563 /lib/Service/ItemServiceV2.php | |
parent | 8b519cd234b1293e03ef288617287be1a30cfc75 (diff) |
Make PHPstan stricter
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Service/ItemServiceV2.php')
-rw-r--r-- | lib/Service/ItemServiceV2.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Service/ItemServiceV2.php b/lib/Service/ItemServiceV2.php index da675450f..fafd5e558 100644 --- a/lib/Service/ItemServiceV2.php +++ b/lib/Service/ItemServiceV2.php @@ -89,6 +89,7 @@ class ItemServiceV2 extends Service public function insertOrUpdate(Item $item): Entity { try { + /** @var Item $db_item */ $db_item = $this->findByGuidHash($item->getFeedId(), $item->getGuidHash()); // Transfer user modifications @@ -243,7 +244,7 @@ class ItemServiceV2 extends Service * @param int $feedId * @param string $guidHash * - * @return Item|Entity + * @return Item * * @throws DoesNotExistException * @throws MultipleObjectsReturnedException @@ -307,7 +308,7 @@ class ItemServiceV2 extends Service */ public function findAllAfter(string $userId, int $feedType, int $updatedSince): array { - if (!in_array($feedType, [ListType::STARRED, ListType::UNREAD, ListType::ALL_ITEMS])) { + if (!in_array($feedType, [ListType::STARRED, ListType::UNREAD, ListType::ALL_ITEMS], true)) { throw new ServiceValidationException('Trying to find in unknown type'); } |