mirror of
https://github.com/friendica/friendica
synced 2025-04-28 13:04:23 +02:00
Continued:
- added more type-hints - some methods in Diaspora returned void but integer was documented so I changed it to -1 to have a proper type-hint
This commit is contained in:
parent
0c9aff8a09
commit
605e7d55b3
3 changed files with 142 additions and 112 deletions
|
@ -48,7 +48,7 @@ class APContact
|
|||
* @param string $addr Address
|
||||
* @return array webfinger data
|
||||
*/
|
||||
private static function fetchWebfingerData(string $addr)
|
||||
private static function fetchWebfingerData(string $addr): array
|
||||
{
|
||||
$addr_parts = explode('@', $addr);
|
||||
if (count($addr_parts) != 2) {
|
||||
|
@ -117,7 +117,7 @@ class APContact
|
|||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function getByURL(string $url, $update = null)
|
||||
public static function getByURL(string $url, $update = null): array
|
||||
{
|
||||
if (empty($url) || Network::isUrlBlocked($url)) {
|
||||
Logger::info('Domain is blocked', ['url' => $url]);
|
||||
|
@ -527,7 +527,7 @@ class APContact
|
|||
* @param string $url inbox url
|
||||
* @param boolean $shared Shared Inbox
|
||||
*/
|
||||
private static function unarchiveInbox($url, $shared)
|
||||
private static function unarchiveInbox(string $url, bool $shared)
|
||||
{
|
||||
if (empty($url)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue