Merge branch 'develop' into phpstan-level-2-in-addons

This commit is contained in:
Art4 2024-12-15 06:57:52 +00:00
commit 78f7285e00
5 changed files with 13 additions and 14 deletions

View file

@ -9,7 +9,7 @@ namespace Friendica\Contact\FriendSuggest\Repository;
use Friendica\BaseRepository;
use Friendica\Contact\FriendSuggest\Collection;
use Friendica\Contact\FriendSuggest\Entity\FriendSuggest as EntityFriendSuggest;
use Friendica\Contact\FriendSuggest\Entity\FriendSuggest as FriendSuggestEntity;
use Friendica\Contact\FriendSuggest\Exception\FriendSuggestNotFoundException;
use Friendica\Contact\FriendSuggest\Exception\FriendSuggestPersistenceException;
use Friendica\Contact\FriendSuggest\Factory;
@ -30,7 +30,7 @@ class FriendSuggest extends BaseRepository
parent::__construct($database, $logger, $factory);
}
private function convertToTableRow(EntityFriendSuggest $fsuggest): array
private function convertToTableRow(FriendSuggestEntity $fsuggest): array
{
return [
'uid' => $fsuggest->uid,
@ -47,7 +47,7 @@ class FriendSuggest extends BaseRepository
/**
* @throws NotFoundException The underlying exception if there's no FriendSuggest with the given conditions
*/
private function selectOne(array $condition, array $params = []): EntityFriendSuggest
private function selectOne(array $condition, array $params = []): FriendSuggestEntity
{
return parent::_selectOne($condition, $params);
}
@ -68,7 +68,7 @@ class FriendSuggest extends BaseRepository
/**
* @throws FriendSuggestNotFoundException in case there's no suggestion for this id
*/
public function selectOneById(int $id): EntityFriendSuggest
public function selectOneById(int $id): FriendSuggestEntity
{
try {
return $this->selectOne(['id' => $id]);
@ -96,7 +96,7 @@ class FriendSuggest extends BaseRepository
/**
* @throws FriendSuggestNotFoundException in case the underlying storage cannot save the suggestion
*/
public function save(EntityFriendSuggest $fsuggest): EntityFriendSuggest
public function save(FriendSuggestEntity $fsuggest): FriendSuggestEntity
{
try {
$fields = $this->convertToTableRow($fsuggest);

View file

@ -164,17 +164,17 @@ class PostMedia extends BaseEntity
/**
* Get preview path for given media id relative to the base URL
*
* @param string $size One of the Proxy::SIZE_* constants
* @param bool $blurred If "true", the preview will be blurred
* @param string $size One of the Proxy::SIZE_* constants
* @param bool $blur If "true", the preview will be blurred
* @return string preview link
*/
public function getPreviewPath(string $size = '', bool $blurred = false): string
public function getPreviewPath(string $size = '', bool $blur = false): string
{
$path = '/photo/preview/' .
(Proxy::getPixelsFromSize($size) ? Proxy::getPixelsFromSize($size) . '/' : '') .
$this->id;
if ($blurred) {
if ($blur) {
$path .= '?' . http_build_query(['blur' => true]);
}
return $path;

View file

@ -503,10 +503,10 @@ class GServer
*
* @param UriInterface $dirtyUri
*
* @return string cleaned URI
* @return UriInterface cleaned URI
* @throws Exception
*/
public static function cleanUri(UriInterface $dirtyUri): string
public static function cleanUri(UriInterface $dirtyUri): UriInterface
{
return $dirtyUri
->withUserInfo('')

View file

@ -12,7 +12,7 @@ use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Factory\Api\Mastodon\Notification as NotificationFactory;
use Friendica\Navigation\Notifications\Entity\Notification as EntityNotification;
use Friendica\Navigation\Notifications\Entity\Notification as NotificationEntity;
use Friendica\Object\Api\Mastodon\Notification;
use Minishlink\WebPush\VAPID;
@ -119,7 +119,7 @@ class Subscription
*
* @return void
*/
public static function pushByNotification(EntityNotification $notification)
public static function pushByNotification(NotificationEntity $notification)
{
$type = NotificationFactory::getType($notification);

View file

@ -7,7 +7,6 @@
namespace Friendica\Security\TwoFactor\Repository;
use Friendica\Security\TwoFactor;
use Friendica\Database\Database;
use Friendica\Security\TwoFactor\Exception\TrustedBrowserNotFoundException;
use Friendica\Security\TwoFactor\Exception\TrustedBrowserPersistenceException;