@@ -125,17 +125,17 @@ |
||
125 | 125 | public function testModifyLimitQueryWithExtraLongQuery() |
126 | 126 | { |
127 | 127 | $query = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 '; |
128 | - $query.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
129 | - $query.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
130 | - $query.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)'; |
|
128 | + $query .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
129 | + $query .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
130 | + $query .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)'; |
|
131 | 131 | |
132 | 132 | $sql = $this->_platform->modifyLimitQuery($query, 10); |
133 | 133 | |
134 | 134 | $expected = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 '; |
135 | - $expected.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
136 | - $expected.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
137 | - $expected.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8) '; |
|
138 | - $expected.= 'ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY'; |
|
135 | + $expected .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
136 | + $expected .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
137 | + $expected .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8) '; |
|
138 | + $expected .= 'ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY'; |
|
139 | 139 | |
140 | 140 | |
141 | 141 | self::assertEquals($expected, $sql); |
@@ -292,14 +292,14 @@ |
||
292 | 292 | public function testModifyLimitQueryWithExtraLongQuery() |
293 | 293 | { |
294 | 294 | $query = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 '; |
295 | - $query.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
296 | - $query.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
297 | - $query.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)'; |
|
295 | + $query .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
296 | + $query .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
297 | + $query .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)'; |
|
298 | 298 | |
299 | 299 | $alteredSql = 'SELECT TOP 10 table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 '; |
300 | - $alteredSql.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
301 | - $alteredSql.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
302 | - $alteredSql.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)'; |
|
300 | + $alteredSql .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) '; |
|
301 | + $alteredSql .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) '; |
|
302 | + $alteredSql .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)'; |
|
303 | 303 | |
304 | 304 | $sql = $this->_platform->modifyLimitQuery($query, 10); |
305 | 305 | $this->expectCteWithMaxRowNum($alteredSql, 10, $sql); |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $c = $this->_platform->getIdentifierQuoteCharacter(); |
46 | - self::assertEquals($c."test".$c, $this->_platform->quoteIdentifier("test")); |
|
47 | - self::assertEquals($c."test".$c.".".$c."test".$c, $this->_platform->quoteIdentifier("test.test")); |
|
46 | + self::assertEquals($c . "test" . $c, $this->_platform->quoteIdentifier("test")); |
|
47 | + self::assertEquals($c . "test" . $c . "." . $c . "test" . $c, $this->_platform->quoteIdentifier("test.test")); |
|
48 | 48 | self::assertEquals(str_repeat($c, 4), $this->_platform->quoteIdentifier($c)); |
49 | 49 | } |
50 | 50 | |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | $c = $this->_platform->getIdentifierQuoteCharacter(); |
61 | - self::assertEquals($c."test".$c, $this->_platform->quoteSingleIdentifier("test")); |
|
62 | - self::assertEquals($c."test.test".$c, $this->_platform->quoteSingleIdentifier("test.test")); |
|
61 | + self::assertEquals($c . "test" . $c, $this->_platform->quoteSingleIdentifier("test")); |
|
62 | + self::assertEquals($c . "test.test" . $c, $this->_platform->quoteSingleIdentifier("test.test")); |
|
63 | 63 | self::assertEquals(str_repeat($c, 4), $this->_platform->quoteSingleIdentifier($c)); |
64 | 64 | } |
65 | 65 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function testRegistersCommentedDoctrineMappingTypeImplicitly() |
119 | 119 | { |
120 | - if (!Type::hasType('my_commented')) { |
|
120 | + if ( ! Type::hasType('my_commented')) { |
|
121 | 121 | Type::addType('my_commented', CommentedType::class); |
122 | 122 | } |
123 | 123 | |
@@ -222,11 +222,11 @@ discard block |
||
222 | 222 | $actuals = array(); |
223 | 223 | |
224 | 224 | if ($this->supportsInlineIndexDeclaration()) { |
225 | - $actuals []= $this->_platform->getIndexDeclarationSQL('name', $indexDef); |
|
225 | + $actuals [] = $this->_platform->getIndexDeclarationSQL('name', $indexDef); |
|
226 | 226 | } |
227 | 227 | |
228 | - $actuals []= $this->_platform->getUniqueConstraintDeclarationSQL('name', $uniqueIndex); |
|
229 | - $actuals []= $this->_platform->getCreateIndexSQL($indexDef, 'table'); |
|
228 | + $actuals [] = $this->_platform->getUniqueConstraintDeclarationSQL('name', $uniqueIndex); |
|
229 | + $actuals [] = $this->_platform->getCreateIndexSQL($indexDef, 'table'); |
|
230 | 230 | |
231 | 231 | foreach ($actuals as $actual) { |
232 | 232 | if ($this->_platform->supportsPartialIndexes()) { |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | |
559 | 559 | public function testGetDefaultValueDeclarationSQLForIntegerTypes() |
560 | 560 | { |
561 | - foreach(array('bigint', 'integer', 'smallint') as $type) { |
|
561 | + foreach (array('bigint', 'integer', 'smallint') as $type) { |
|
562 | 562 | $field = array( |
563 | 563 | 'type' => Type::getType($type), |
564 | 564 | 'default' => 1 |
@@ -654,24 +654,24 @@ discard block |
||
654 | 654 | |
655 | 655 | // Foreign table with reserved keyword as name (needs quotation). |
656 | 656 | $foreignTable = new Table('foreign'); |
657 | - $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation). |
|
658 | - $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation). |
|
657 | + $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation). |
|
658 | + $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation). |
|
659 | 659 | $foreignTable->addColumn('`foo-bar`', 'string'); // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite). |
660 | 660 | |
661 | 661 | $table->addForeignKeyConstraint($foreignTable, array('create', 'foo', '`bar`'), array('create', 'bar', '`foo-bar`'), array(), 'FK_WITH_RESERVED_KEYWORD'); |
662 | 662 | |
663 | 663 | // Foreign table with non-reserved keyword as name (does not need quotation). |
664 | 664 | $foreignTable = new Table('foo'); |
665 | - $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation). |
|
666 | - $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation). |
|
665 | + $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation). |
|
666 | + $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation). |
|
667 | 667 | $foreignTable->addColumn('`foo-bar`', 'string'); // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite). |
668 | 668 | |
669 | 669 | $table->addForeignKeyConstraint($foreignTable, array('create', 'foo', '`bar`'), array('create', 'bar', '`foo-bar`'), array(), 'FK_WITH_NON_RESERVED_KEYWORD'); |
670 | 670 | |
671 | 671 | // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite). |
672 | 672 | $foreignTable = new Table('`foo-bar`'); |
673 | - $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation). |
|
674 | - $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation). |
|
673 | + $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation). |
|
674 | + $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation). |
|
675 | 675 | $foreignTable->addColumn('`foo-bar`', 'string'); // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite). |
676 | 676 | |
677 | 677 | $table->addForeignKeyConstraint($foreignTable, array('create', 'foo', '`bar`'), array('create', 'bar', '`foo-bar`'), array(), 'FK_WITH_INTENDED_QUOTATION'); |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | { |
722 | 722 | $index = new Index('select', array('foo')); |
723 | 723 | |
724 | - if (! $this->supportsInlineIndexDeclaration()) { |
|
724 | + if ( ! $this->supportsInlineIndexDeclaration()) { |
|
725 | 725 | $this->expectException('Doctrine\DBAL\DBALException'); |
726 | 726 | } |
727 | 727 | |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | */ |
1079 | 1079 | public function testQuotesDropForeignKeySQL() |
1080 | 1080 | { |
1081 | - if (! $this->_platform->supportsForeignKeyConstraints()) { |
|
1081 | + if ( ! $this->_platform->supportsForeignKeyConstraints()) { |
|
1082 | 1082 | $this->markTestSkipped( |
1083 | 1083 | sprintf('%s does not support foreign key constraints.', get_class($this->_platform)) |
1084 | 1084 | ); |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | */ |
1187 | 1187 | public function testGeneratesInlineColumnCommentSQL($comment, $expectedSql) |
1188 | 1188 | { |
1189 | - if (! $this->_platform->supportsInlineColumnComments()) { |
|
1189 | + if ( ! $this->_platform->supportsInlineColumnComments()) { |
|
1190 | 1190 | $this->markTestSkipped(sprintf('%s does not support inline column comments.', get_class($this->_platform))); |
1191 | 1191 | } |
1192 | 1192 |
@@ -672,7 +672,7 @@ |
||
672 | 672 | array(false, 'false', 0, false), |
673 | 673 | array('f', 'false', 0, false), |
674 | 674 | array('false', 'false', 0, false), |
675 | - array( 'n', 'false', 0, false), |
|
675 | + array('n', 'false', 0, false), |
|
676 | 676 | array('no', 'false', 0, false), |
677 | 677 | array('off', 'false', 0, false), |
678 | 678 | array('0', 'false', 0, false), |
@@ -311,11 +311,11 @@ discard block |
||
311 | 311 | ); |
312 | 312 | $statements = $this->_platform->getCreateTableSQL($table); |
313 | 313 | //strip all the whitespace from the statements |
314 | - array_walk($statements, function(&$value){ |
|
315 | - $value = preg_replace('/\s+/', ' ',$value); |
|
314 | + array_walk($statements, function(&$value) { |
|
315 | + $value = preg_replace('/\s+/', ' ', $value); |
|
316 | 316 | }); |
317 | - foreach($targets as $key => $sql){ |
|
318 | - self::assertArrayHasKey($key,$statements); |
|
317 | + foreach ($targets as $key => $sql) { |
|
318 | + self::assertArrayHasKey($key, $statements); |
|
319 | 319 | self::assertEquals($sql, $statements[$key]); |
320 | 320 | } |
321 | 321 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | |
349 | 349 | public function getBitAndComparisonExpressionSql($value1, $value2) |
350 | 350 | { |
351 | - return 'BITAND('.$value1 . ', ' . $value2 . ')'; |
|
351 | + return 'BITAND(' . $value1 . ', ' . $value2 . ')'; |
|
352 | 352 | } |
353 | 353 | |
354 | 354 | public function getBitOrComparisonExpressionSql($value1, $value2) |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | { |
16 | 16 | public function testModifyLimitQueryWitoutLimit() |
17 | 17 | { |
18 | - $sql = $this->_platform->modifyLimitQuery('SELECT n FROM Foo', null , 10); |
|
19 | - self::assertEquals('SELECT n FROM Foo LIMIT 18446744073709551615 OFFSET 10',$sql); |
|
18 | + $sql = $this->_platform->modifyLimitQuery('SELECT n FROM Foo', null, 10); |
|
19 | + self::assertEquals('SELECT n FROM Foo LIMIT 18446744073709551615 OFFSET 10', $sql); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function testGenerateMixedCaseTableCreate() |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | array('CREATE TABLE foreign_table (id INT NOT NULL, fk_id INT NOT NULL, INDEX IDX_5690FFE2A57719D0 (fk_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = MyISAM'), |
545 | 545 | $this->_platform->getCreateTableSQL( |
546 | 546 | $table, |
547 | - AbstractPlatform::CREATE_INDEXES|AbstractPlatform::CREATE_FOREIGNKEYS |
|
547 | + AbstractPlatform::CREATE_INDEXES | AbstractPlatform::CREATE_FOREIGNKEYS |
|
548 | 548 | ) |
549 | 549 | ); |
550 | 550 | |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | ), |
559 | 559 | $this->_platform->getCreateTableSQL( |
560 | 560 | $table, |
561 | - AbstractPlatform::CREATE_INDEXES|AbstractPlatform::CREATE_FOREIGNKEYS |
|
561 | + AbstractPlatform::CREATE_INDEXES | AbstractPlatform::CREATE_FOREIGNKEYS |
|
562 | 562 | ) |
563 | 563 | ); |
564 | 564 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function getSchemaManager(\Doctrine\DBAL\Connection $conn) |
50 | 50 | { |
51 | - if($this->_schemaManagerMock == null) { |
|
51 | + if ($this->_schemaManagerMock == null) { |
|
52 | 52 | return new SchemaManagerMock($conn); |
53 | 53 | } |
54 | 54 |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | // Connect to tmpdb in order to drop and create the real test db. |
88 | 88 | $tmpConn = DriverManager::getConnection($tmpDbParams); |
89 | 89 | |
90 | - $platform = $tmpConn->getDatabasePlatform(); |
|
90 | + $platform = $tmpConn->getDatabasePlatform(); |
|
91 | 91 | |
92 | - if (! self::$initialized) { |
|
92 | + if ( ! self::$initialized) { |
|
93 | 93 | if ($platform->supportsCreateDropDatabase()) { |
94 | 94 | $dbname = $realConn->getDatabase(); |
95 | 95 | $realConn->close(); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | private static function getFallbackConnectionParams() |
118 | 118 | { |
119 | - if (! extension_loaded('pdo_sqlite')) { |
|
119 | + if ( ! extension_loaded('pdo_sqlite')) { |
|
120 | 120 | Assert::markTestSkipped('PDO SQLite extension is not loaded'); |
121 | 121 | } |
122 | 122 |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | throw $t; |
64 | 64 | } |
65 | 65 | |
66 | - if(isset($this->_sqlLoggerStack->queries) && count($this->_sqlLoggerStack->queries)) { |
|
66 | + if (isset($this->_sqlLoggerStack->queries) && count($this->_sqlLoggerStack->queries)) { |
|
67 | 67 | $queries = ""; |
68 | 68 | $i = count($this->_sqlLoggerStack->queries); |
69 | 69 | foreach (array_reverse($this->_sqlLoggerStack->queries) as $query) { |
@@ -71,29 +71,29 @@ discard block |
||
71 | 71 | if (is_object($p)) { |
72 | 72 | return get_class($p); |
73 | 73 | } elseif (is_scalar($p)) { |
74 | - return "'".$p."'"; |
|
74 | + return "'" . $p . "'"; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | return var_export($p, true); |
78 | 78 | }, $query['params'] ?: array()); |
79 | - $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(", ", $params).PHP_EOL; |
|
79 | + $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(", ", $params) . PHP_EOL; |
|
80 | 80 | $i--; |
81 | 81 | } |
82 | 82 | |
83 | 83 | $trace = $t->getTrace(); |
84 | 84 | $traceMsg = ""; |
85 | - foreach($trace as $part) { |
|
86 | - if(isset($part['file'])) { |
|
87 | - if(strpos($part['file'], "PHPUnit/") !== false) { |
|
85 | + foreach ($trace as $part) { |
|
86 | + if (isset($part['file'])) { |
|
87 | + if (strpos($part['file'], "PHPUnit/") !== false) { |
|
88 | 88 | // Beginning with PHPUnit files we don't print the trace anymore. |
89 | 89 | break; |
90 | 90 | } |
91 | 91 | |
92 | - $traceMsg .= $part['file'].":".$part['line'].PHP_EOL; |
|
92 | + $traceMsg .= $part['file'] . ":" . $part['line'] . PHP_EOL; |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | - $message = "[".get_class($t)."] ".$t->getMessage().PHP_EOL.PHP_EOL."With queries:".PHP_EOL.$queries.PHP_EOL."Trace:".PHP_EOL.$traceMsg; |
|
96 | + $message = "[" . get_class($t) . "] " . $t->getMessage() . PHP_EOL . PHP_EOL . "With queries:" . PHP_EOL . $queries . PHP_EOL . "Trace:" . PHP_EOL . $traceMsg; |
|
97 | 97 | |
98 | 98 | throw new \Exception($message, (int) $t->getCode(), $t); |
99 | 99 | } |