phpstan level 1 errors reduction

This commit is contained in:
marko
2025-11-20 20:02:26 +01:00
parent f28fa7b51b
commit 275b6481cc
40 changed files with 223 additions and 152 deletions

View File

@@ -522,17 +522,15 @@ function getUserData($userId)
/// @todo Legacy function! Replace with one within the User-Framework!
function getUsersKids($userId, $options = [])
{
$options["attribute"] ??
($query = <<<SQL
SELECT *
FROM `wkParticipo_Users`
JOIN `vormundschaft`
ON `wkParticipo_Users`.`id` = `vormundschaft`.`kidId`
WHERE `vormundschaft`.`userId` = :userId;
SQL);
$query = <<<SQL
SELECT *
FROM `wkParticipo_Users`
JOIN `vormundschaft`
ON `wkParticipo_Users`.`id` = `vormundschaft`.`kidId`
WHERE `vormundschaft`.`userId` = :userId;
SQL;
$params = [
":userId" => ["value" => $userId, "data_type" => PDO::PARAM_INT],
];
$result = dbConnector::query($query, $params);
return $result;
return dbConnector::query($query, $params);
}