Type hints, corrected wrong documentation

2022.09-rc
Michael Vogel 2019-08-30 07:38:42 +02:00
rodzic 481376dd6f
commit 438394bc1d
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -420,7 +420,7 @@ class PostUpdate
return true;
}
/**
* Set the delivery queue count to a negative value for all items preceding the feature.
* Remove contact duplicates
*
* @return bool "true" when the job is done
* @throws \Friendica\Network\HTTPException\InternalServerErrorException

Wyświetl plik

@ -146,7 +146,7 @@ class Contact extends BaseObject
* @return boolean was the insert successful?
* @throws \Exception
*/
public static function insert($param, $on_duplicate_update = false)
public static function insert(array $param, bool $on_duplicate_update = false)
{
$ret = DBA::insert('contact', $param, $on_duplicate_update);
$contact = DBA::selectFirst('contact', ['nurl', 'uid'], ['id' => DBA::lastInsertId()]);
@ -1927,7 +1927,7 @@ class Contact extends BaseObject
* @param integer $contact_id Contact ID
* @throws \Exception
*/
public static function handleDuplicateByID($contact_id)
public static function handleDuplicateByID(int $contact_id)
{
$contact = DBA::selectFirst('contact', ['nurl', 'uid'], ['id' => $contact_id, 'deleted' => false]);
if (!DBA::isResult($contact)) {
@ -1948,7 +1948,7 @@ class Contact extends BaseObject
* @return boolean
* @throws \Exception
*/
private static function handleDuplicates($nurl, $uid)
private static function handleDuplicates(string $nurl, int $uid)
{
$condition = ['nurl' => $nurl, 'uid' => $uid, 'deleted' => false, 'network' => Protocol::FEDERATED];
$count = DBA::count('contact', $condition);