PHPStan level 3 #1603
1 changed files with 2 additions and 2 deletions
Remove type casting to int
commit
db875bc755
|
@ -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);
|
||||
Art4 marked this conversation as resolved
Outdated
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue
Please change
\Friendica\Protocol\ATProtocol\Processor::fetchUriId
to always return an integer. This is what the method is expected to do.Done with https://github.com/friendica/friendica/pull/14830/commits/8ba652818f169a4391c193f9dde31c3c0dddb61e and removed the type casting with
db875bc755