1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 21:58:10 +02:00

Connection, dibi: deprecated insertId() & affectedRows()

This commit is contained in:
David Grudl
2017-09-07 20:45:21 +02:00
parent 0531e82838
commit 125db626e5
2 changed files with 8 additions and 8 deletions

View File

@@ -312,11 +312,11 @@ class Connection
/** /**
* Gets the number of affected rows. Alias for getAffectedRows(). * @deprecated
* @throws Exception
*/ */
public function affectedRows(): int public function affectedRows(): int
{ {
trigger_error(__METHOD__ . '() is deprecated, use getAffectedRows()', E_USER_DEPRECATED);
return $this->getAffectedRows(); return $this->getAffectedRows();
} }
@@ -337,11 +337,11 @@ class Connection
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId(). * @deprecated
* @throws Exception
*/ */
public function insertId(string $sequence = null): int public function insertId(string $sequence = null): int
{ {
trigger_error(__METHOD__ . '() is deprecated, use getInsertId()', E_USER_DEPRECATED);
return $this->getInsertId($sequence); return $this->getInsertId($sequence);
} }

View File

@@ -226,11 +226,11 @@ class dibi
/** /**
* Gets the number of affected rows. Alias for getAffectedRows(). * @deprecated
* @throws Dibi\Exception
*/ */
public static function affectedRows(): int public static function affectedRows(): int
{ {
trigger_error(__METHOD__ . '() is deprecated, use getAffectedRows()', E_USER_DEPRECATED);
return self::getConnection()->getAffectedRows(); return self::getConnection()->getAffectedRows();
} }
@@ -247,11 +247,11 @@ class dibi
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId(). * @deprecated
* @throws Dibi\Exception
*/ */
public static function insertId(string $sequence = null): int public static function insertId(string $sequence = null): int
{ {
trigger_error(__METHOD__ . '() is deprecated, use getInsertId()', E_USER_DEPRECATED);
return self::getConnection()->getInsertId($sequence); return self::getConnection()->getInsertId($sequence);
} }