Add type hint to Database::insert

- Will escalate warning to fatal error in https://github.com/friendica/friendica/issues/8474#issuecomment-646802016
This commit is contained in:
Hypolite Petovan 2020-06-24 09:36:34 -04:00
parent 7fd2c00171
commit 5cf5869b04

View file

@ -979,7 +979,7 @@ class Database
* @return boolean was the insert successful? * @return boolean was the insert successful?
* @throws \Exception * @throws \Exception
*/ */
public function insert($table, $param, $on_duplicate_update = false) public function insert($table, array $param, bool $on_duplicate_update = false)
{ {
if (empty($table) || empty($param)) { if (empty($table) || empty($param)) {
$this->logger->info('Table and fields have to be set'); $this->logger->info('Table and fields have to be set');