File tree 3 files changed +4
-0
lines changed
3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 24
24
- Enh #801 : Deprecate ` SchemaInterface::isReadQuery() ` and add ` DbStringHelper::isReadQuery() ` method (@Tigrov )
25
25
- Enh #801 : Remove unnecessary symbol ` \\ ` from ` rtrim() ` function inside ` DbStringHelper::baseName() ` method (@Tigrov )
26
26
- Bug #801 : Fix bug with ` Quoter::$tablePrefix ` when change ` AbstractConnection::$tablePrefix ` property (@Tigrov )
27
+ - Enh #810 : Add more specific psalm type for ` QueryFunctionsInterface::count() ` result (@vjik )
27
28
28
29
## 1.2.0 November 12, 2023
29
30
Original file line number Diff line number Diff line change @@ -300,6 +300,7 @@ public function count(string $sql = '*'): int|string
300
300
return 0 ;
301
301
}
302
302
303
+ /** @psalm-var non-negative-int|string */
303
304
return $ count <= PHP_INT_MAX ? (int ) $ count : $ count ;
304
305
}
305
306
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ public function average(string $sql): int|float|null|string;
39
39
* @return int|string Number of records. The result may be a string depending on the underlying database engine and
40
40
* to support integer values higher than a 32bit PHP integer can handle.
41
41
*
42
+ * @psalm-return non-negative-int|string
43
+ *
42
44
* Note: Make sure you quote column names in the expression.
43
45
*/
44
46
public function count (string $ sql = '* ' ): int |string ;
You can’t perform that action at this time.
0 commit comments