We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1858ed8 commit cdba36fCopy full SHA for cdba36f
src/Sql/Type.php
@@ -4,6 +4,7 @@
4
5
namespace SimPod\ClickHouseClient\Sql;
6
7
+use function assert;
8
use function preg_match;
9
10
final readonly class Type
@@ -14,7 +15,8 @@ private function __construct(public string $name, public string $params)
14
15
16
public static function fromString(string $type): self
17
{
- preg_match('~([a-zA-Z\d ]+)(?:\((.+)\))?~', $type, $matches);
18
+ $result = preg_match('~([a-zA-Z\d ]+)(?:\((.+)\))?~', $type, $matches);
19
+ assert($result === 1);
20
21
return new self($matches[1], $matches[2] ?? '');
22
}
0 commit comments