mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Update PropertiesBase to new patterns and improve static analysis checks
This commit is contained in:
parent
5f0b57f7e9
commit
6c8414f844
33 changed files with 335 additions and 148 deletions
|
@ -6,6 +6,9 @@ class Db{
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @param array<mixed> $args
|
||||
* @param string $class
|
||||
* @return Array<mixed>
|
||||
*/
|
||||
public static function Query(string $query, array $args = [], string $class = 'stdClass'): array{
|
||||
|
@ -20,6 +23,10 @@ class Db{
|
|||
return $GLOBALS['DbConnection']->Query($query, $args, $class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @param array<mixed> $args
|
||||
*/
|
||||
public static function QueryInt(string $query, array $args = []): int{
|
||||
// Useful for queries that return a single integer as a result, like count(*) or sum(*).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue