From ce91d21e93d8a0195c19fd3cf1f2180ef0c1ef77 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Tue, 16 Jan 2024 16:44:47 +0700 Subject: [PATCH] Fix psalm issues --- src/Schema.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Schema.php b/src/Schema.php index 931b2f46..1ddfab06 100644 --- a/src/Schema.php +++ b/src/Schema.php @@ -748,7 +748,7 @@ protected function getCacheTag(): string */ private function findTableComment(TableSchemaInterface $tableSchema): void { - $sql = $tableSchema->getCreateSql(); + $sql = $tableSchema->getCreateSql() ?? ''; if (preg_match('#^[^(]+?((?:\s*--[^\n]*|\s*/\*.*?\*/)+)\s*\(#', $sql, $matches) === 1) { $comment = $this->filterComment($matches[1]); @@ -763,7 +763,7 @@ private function findTableComment(TableSchemaInterface $tableSchema): void */ private function findComments(TableSchemaInterface $tableSchema): void { - $sql = $tableSchema->getCreateSql(); + $sql = $tableSchema->getCreateSql() ?? ''; if (!preg_match('#^(?:[^(]*--[^\n]*|[^(]*/\*.*?\*/)*[^(]*\((.*)\)[^)]*$#s', $sql, $matches)) { return;