summaryrefslogtreecommitdiffstats
path: root/lib/Service/ItemServiceV2.php
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2020-11-20 20:52:54 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-03-25 18:47:38 +0100
commit2baa7a2b9136d4d4dc1e56dfc043cc71da3ee1df (patch)
treed8f970ce85442869ad9547f80f70153a31820563 /lib/Service/ItemServiceV2.php
parent8b519cd234b1293e03ef288617287be1a30cfc75 (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.php5
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');
}