diff --git a/src/Connection.php b/src/Connection.php index 2549f04132f..755c2226db7 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -378,7 +378,7 @@ private function addCriteriaCondition( * @param array $criteria * @param array|array $types * - * @return int|string The number of affected rows. + * @return int|numeric-string The number of affected rows. * * @throws Exception */ @@ -445,7 +445,7 @@ public function getTransactionIsolation(): TransactionIsolationLevel * @param array $criteria * @param array|array $types * - * @return int|string The number of affected rows. + * @return int|numeric-string The number of affected rows. * * @throws Exception */ @@ -482,7 +482,7 @@ public function update(string $table, array $data, array $criteria = [], array $ * @param array $data * @param array|array $types * - * @return int|string The number of affected rows. + * @return int|numeric-string The number of affected rows. * * @throws Exception */ @@ -839,6 +839,8 @@ public function executeCacheQuery(string $sql, array $params, array $types, Quer * @param list|array $params * @psalm-param WrapperParameterTypeArray $types * + * @return int|numeric-string + * * @throws Exception */ public function executeStatement(string $sql, array $params = [], array $types = []): int|string @@ -1371,6 +1373,8 @@ private function handleDriverException( * @param array|array $params * @psalm-param WrapperParameterTypeArray $types * + * @return int|numeric-string + * * @throws Exception */ public function executeUpdate(string $sql, array $params = [], array $types = []): int|string @@ -1392,6 +1396,8 @@ public function query(string $sql): Result * BC layer for a wide-spread use-case of old DBAL APIs * * @deprecated This API is deprecated and will be removed after 2022 + * + * @return int|numeric-string */ public function exec(string $sql): int|string { diff --git a/src/Driver/Connection.php b/src/Driver/Connection.php index f5229a2d298..b6411a060d3 100644 --- a/src/Driver/Connection.php +++ b/src/Driver/Connection.php @@ -39,6 +39,8 @@ public function quote(string $value): string; * If the number of affected rows is greater than the maximum int value (PHP_INT_MAX), * the number of affected rows may be returned as a string. * + * @return int|numeric-string + * * @throws Exception */ public function exec(string $sql): int|string; diff --git a/src/Driver/Result.php b/src/Driver/Result.php index 64fe253e4b3..500cb88701b 100644 --- a/src/Driver/Result.php +++ b/src/Driver/Result.php @@ -70,6 +70,8 @@ public function fetchFirstColumn(): array; * * If the number of rows exceeds {@see PHP_INT_MAX}, it might be returned as string if the driver supports it. * + * @return int|numeric-string + * * @throws Exception */ public function rowCount(): int|string; diff --git a/src/Query/QueryBuilder.php b/src/Query/QueryBuilder.php index 8b15ad7f1c1..2e7fac483b5 100644 --- a/src/Query/QueryBuilder.php +++ b/src/Query/QueryBuilder.php @@ -303,7 +303,7 @@ public function executeQuery(): Result * * Should be used for INSERT, UPDATE and DELETE * - * @return int|string The number of affected rows. + * @return int|numeric-string The number of affected rows. * * @throws Exception */ diff --git a/src/Result.php b/src/Result.php index b15babfade7..d532531f586 100644 --- a/src/Result.php +++ b/src/Result.php @@ -225,6 +225,8 @@ public function iterateColumn(): Traversable * * If the number of rows exceeds {@see PHP_INT_MAX}, it might be returned as string if the driver supports it. * + * @return int|numeric-string + * * @throws Exception */ public function rowCount(): int|string diff --git a/src/Statement.php b/src/Statement.php index 78997097d50..9b4a3b43bca 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -124,6 +124,8 @@ public function executeQuery(): Result * * If the number of rows exceeds {@see PHP_INT_MAX}, it might be returned as string if the driver supports it. * + * @return int|numeric-string + * * @throws Exception */ public function executeStatement(): int|string