Skip to content

Commit 124dbcf

Browse files
committed
CT-1526 - fix phpstan
1 parent b3d4a6f commit 124dbcf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Definition/Exasol.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ private function validateLength(string $type, $length = null): void
328328
}
329329

330330
if (preg_match('/(?<val>[1-9]+\d*)\s*(?<unit>BYTE|BIT)/i', (string) $length, $matched)) {
331-
$val = $matched['val'];
331+
$val = (int) $matched['val'];
332332
$unit = strtoupper($matched['unit']);
333333

334334
$limits = [

src/Definition/Snowflake.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ private function validateLength(string $type, $length = null): void
354354
break;
355355
case self::TYPE_VECTOR:
356356
$valid = false;
357-
if ($length === null) {
357+
if ($length === null || !is_string($length)) {
358358
break;
359359
}
360360
/** matches:

0 commit comments

Comments
 (0)