Added some type-hints
This commit is contained in:
parent
69a68be800
commit
3f74a59f73
|
@ -83,7 +83,7 @@ class ActivityPub
|
||||||
*
|
*
|
||||||
* @return bool is it AP?
|
* @return bool is it AP?
|
||||||
*/
|
*/
|
||||||
public static function isRequest()
|
public static function isRequest(): bool
|
||||||
{
|
{
|
||||||
$isrequest = stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/activity+json') ||
|
$isrequest = stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/activity+json') ||
|
||||||
stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/json') ||
|
stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/json') ||
|
||||||
|
@ -202,6 +202,7 @@ class ActivityPub
|
||||||
*
|
*
|
||||||
* @param string $url
|
* @param string $url
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function fetchOutbox(string $url, int $uid)
|
public static function fetchOutbox(string $url, int $uid)
|
||||||
|
@ -268,7 +269,7 @@ class ActivityPub
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isSupportedByContactUrl(string $url, $update = null)
|
public static function isSupportedByContactUrl(string $url, $update = null): bool
|
||||||
{
|
{
|
||||||
return !empty(APContact::getByURL($url, $update));
|
return !empty(APContact::getByURL($url, $update));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user