From: Michael Vogel Date: Fri, 30 Aug 2019 05:38:42 +0000 (+0200) Subject: Type hints, corrected wrong documentation X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=438394bc1d4478974b26fe5b1ce1dfa1acbf820f;p=friendica.git Type hints, corrected wrong documentation --- diff --git a/src/Database/PostUpdate.php b/src/Database/PostUpdate.php index 2e3af8597b..8c5414bfc2 100644 --- a/src/Database/PostUpdate.php +++ b/src/Database/PostUpdate.php @@ -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 diff --git a/src/Model/Contact.php b/src/Model/Contact.php index dfabf260de..a8dc673bce 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -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);