PHPStan level 3 #1603

Merged
nupplaPhil merged 15 commits from Art4/friendica-addons:phpstan-level-3 into develop 2025-04-27 02:17:42 +02:00
Showing only changes of commit db875bc755 - Show all commits

Remove type casting to int

Art4 2025-03-14 07:49:20 +00:00

View file

@ -961,13 +961,13 @@ function bluesky_complete_post(stdClass $post, int $uid, int $post_reason, int $
if (!empty($existing_uri)) {
$comments = Post::countPosts(['thr-parent' => $existing_uri, 'gravity' => Item::GRAVITY_COMMENT]);
if (($post->replyCount <= $comments) || !$complete) {
return (int) DI::atpProcessor()->fetchUriId($existing_uri, $uid);
return DI::atpProcessor()->fetchUriId($existing_uri, $uid);
}
}
if ($complete) {
$uri = DI::atpProcessor()->fetchMissingPost(DI::atpProcessor()->getUri($post), $uid, $post_reason, $causer, 0, '', true, $protocol);
$uri_id = (int) DI::atpProcessor()->fetchUriId($uri, $uid);
$uri_id = DI::atpProcessor()->fetchUriId($uri, $uid);
} else {
$uri_id = DI::atpProcessor()->processPost($post, $uid, $post_reason, $causer, 0, $protocol);
}