Skip to content

Commit

Permalink
Fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Jan 16, 2024
1 parent cb874bc commit ce91d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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;
Expand Down

0 comments on commit ce91d21

Please sign in to comment.