This commit is contained in:
Yuri Kuznetsov
2023-04-28 16:19:41 +03:00
parent 86c8fe9a83
commit 83b60e49c6
3 changed files with 16 additions and 5 deletions
@@ -81,6 +81,7 @@ class AndGroup implements WhereItem
$whereClause = $whereClause[0];
}
// Do not refactor.
$obj = static::class === WhereClause::class ?
new WhereClause() :
new self();
+8 -3
View File
@@ -175,12 +175,17 @@ class Select implements SelectingQuery
return null;
}
/** @phpstan-ignore-next-line */
return WhereClause::fromRaw($havingClause);
$having = WhereClause::fromRaw($havingClause);
if (!$having instanceof WhereClause) {
throw new RuntimeException();
}
return $having;
}
/**
* @param array<string,mixed> $params
* @param array<string, mixed> $params
*/
private function validateRawParams(array $params): void
{
@@ -74,8 +74,13 @@ trait SelectingTrait
return null;
}
/** @phpstan-ignore-next-line */
return WhereClause::fromRaw($whereClause);
$where = WhereClause::fromRaw($whereClause);
if (!$where instanceof WhereClause) {
throw new RuntimeException();
}
return $where;
}
/**