Skip to content

Commit 91a08f8

Browse files
authored
fix: add missing @throws (#261)
1 parent 9cd59e7 commit 91a08f8

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/Client/ClickHouseClient.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function selectWithParams(string $query, array $params, Format $outputFor
7171
* @throws ClientExceptionInterface
7272
* @throws ServerError
7373
* @throws UnsupportedParamType
74+
* @throws UnsupportedParamValue
7475
*/
7576
public function insert(string $table, array $values, array|null $columns = null, array $settings = []): void;
7677

src/Sql/ExpressionFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44

55
namespace SimPod\ClickHouseClient\Sql;
66

7+
use SimPod\ClickHouseClient\Exception\UnsupportedParamValue;
8+
79
use function array_map;
810
use function sprintf;
911

10-
final class ExpressionFactory
12+
final readonly class ExpressionFactory
1113
{
1214
public function __construct(private ValueFormatter $valueFormatter)
1315
{
1416
}
1517

18+
/** @throws UnsupportedParamValue */
1619
public function templateAndValues(string $template, mixed ...$values): Expression
1720
{
1821
return Expression::new(

src/Sql/ValueFormatter.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use function sprintf;
2424

2525
/** @internal */
26-
final class ValueFormatter
26+
final readonly class ValueFormatter
2727
{
2828
public function __construct(private DateTimeZone|null $dateTimeZone = null)
2929
{
@@ -117,6 +117,8 @@ public function format(mixed $value, string|null $paramName = null, string|null
117117
* @param array<mixed> $values
118118
*
119119
* @return array<string>
120+
*
121+
* @throws UnsupportedParamValue
120122
*/
121123
public function mapFormat(array $values): array
122124
{
@@ -132,7 +134,11 @@ function ($value): string {
132134
);
133135
}
134136

135-
/** @param array<mixed> $value */
137+
/**
138+
* @param array<mixed> $value
139+
*
140+
* @throws UnsupportedParamValue
141+
*/
136142
private function formatArray(array $value): string
137143
{
138144
return sprintf(

0 commit comments

Comments
 (0)