Skip to content

Commit

Permalink
Merge pull request doctrine#4483 from mvorisek/better_indent
Browse files Browse the repository at this point in the history
Improve heredoc indentation
  • Loading branch information
greg0ire committed Jan 21, 2021
2 parents f8b98ad + 9a8ea5e commit b4d5a62
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ public function getDropIndexSQL($index, $table = null)

return sprintf(
<<<SQL
IF EXISTS (SELECT * FROM sysobjects WHERE name = '%s')
ALTER TABLE %s DROP CONSTRAINT %s
ELSE
DROP INDEX %s ON %s
SQL
IF EXISTS (SELECT * FROM sysobjects WHERE name = '%s')
ALTER TABLE %s DROP CONSTRAINT %s
ELSE
DROP INDEX %s ON %s
SQL
,
$index,
$table,
Expand Down Expand Up @@ -1692,10 +1692,10 @@ protected function getCommentOnTableSQL(string $tableName, ?string $comment): st
{
return sprintf(
<<<'SQL'
EXEC sys.sp_addextendedproperty @name=N'MS_Description',
@value=N%s, @level0type=N'SCHEMA', @level0name=N'dbo',
@level1type=N'TABLE', @level1name=N%s
SQL
EXEC sys.sp_addextendedproperty @name=N'MS_Description',
@value=N%s, @level0type=N'SCHEMA', @level0name=N'dbo',
@level1type=N'TABLE', @level1name=N%s
SQL
,
$this->quoteStringLiteral((string) $comment),
$this->quoteStringLiteral($tableName)
Expand All @@ -1706,14 +1706,14 @@ public function getListTableMetadataSQL(string $table): string
{
return sprintf(
<<<'SQL'
SELECT
p.value AS [table_comment]
FROM
sys.tables AS tbl
INNER JOIN sys.extended_properties AS p ON p.major_id=tbl.object_id AND p.minor_id=0 AND p.class=1
WHERE
(tbl.name=N%s and SCHEMA_NAME(tbl.schema_id)=N'dbo' and p.name=N'MS_Description')
SQL
SELECT
p.value AS [table_comment]
FROM
sys.tables AS tbl
INNER JOIN sys.extended_properties AS p ON p.major_id=tbl.object_id AND p.minor_id=0 AND p.class=1
WHERE
(tbl.name=N%s and SCHEMA_NAME(tbl.schema_id)=N'dbo' and p.name=N'MS_Description')
SQL
,
$this->quoteStringLiteral($table)
);
Expand Down

0 comments on commit b4d5a62

Please sign in to comment.