From d1511cdbee24b27eb966eee334f3d686cbaec3d7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 11 Mar 2015 09:00:47 +0100 Subject: Fix doc blocks of insertIfNotExists() method --- lib/private/appframework/db/db.php | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'lib/private/appframework/db') diff --git a/lib/private/appframework/db/db.php b/lib/private/appframework/db/db.php index 18c32c948c5..0824e108f49 100644 --- a/lib/private/appframework/db/db.php +++ b/lib/private/appframework/db/db.php @@ -121,24 +121,16 @@ class Db implements IDb { } /** - * Insert a row if a matching row doesn't exists. - * @param string $table The table name (will replace *PREFIX*) to perform the replace on. - * @param array $input - * @throws \OC\HintException - * - * The input array if in the form: - * - * array ( 'id' => array ( 'value' => 6, - * 'key' => true - * ), - * 'name' => array ('value' => 'Stoyan'), - * 'family' => array ('value' => 'Stefanov'), - * 'birth_date' => array ('value' => '1975-06-20') - * ); - * @return bool + * Insert a row if the matching row does not exists. * + * @param string $table The table name (will replace *PREFIX* with the actual prefix) + * @param array $input data that should be inserted into the table (column name => value) + * @param array|null $compare List of values that should be checked for "if not exists" + * If this is null or an empty array, all keys of $input will be compared + * @return int number of inserted rows + * @throws \Doctrine\DBAL\DBALException */ - public function insertIfNotExist($table, $input, $compare = null) { + public function insertIfNotExist($table, $input, array $compare = null) { return $this->connection->insertIfNotExist($table, $input, $compare); } -- cgit v1.2.3