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 29, 2024
1 parent 05ebf54 commit 334661b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/DDLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public function createIndex(
[$schema, $table] = $tableParts;
}

return 'CREATE ' . ($indexType ? ($indexType . ' ') : '') . 'INDEX '
. $this->quoter->quoteTableName(($schema ? $schema . '.' : '') . $name)
return 'CREATE ' . ($indexType !== null ? $indexType . ' ' : '') . 'INDEX '
. $this->quoter->quoteTableName(($schema !== null ? $schema . '.' : '') . $name)
. ' ON '
. $this->quoter->quoteTableName($table)
. ' (' . $this->queryBuilder->buildColumns($columns) . ')';
Expand Down
2 changes: 1 addition & 1 deletion src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ private function getJsonColumns(TableSchemaInterface $table): array
$regexp = '/\bjson_valid\(\s*["`\[]?(.+?)["`\]]?\s*\)/i';

foreach ($checks as $check) {
if (preg_match_all($regexp, $check->getExpression(), $matches, PREG_SET_ORDER)) {
if (preg_match_all($regexp, $check->getExpression(), $matches, PREG_SET_ORDER) > 0) {
foreach ($matches as $match) {
$result[] = $match[1];
}
Expand Down

0 comments on commit 334661b

Please sign in to comment.