Passed
Branch tests-better-coverage (52d7f0)
by Michael
04:07
created
tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             $sm->createTable($table);
39 39
 
40 40
 
41
-        } catch(\Exception $e) {
41
+        } catch (\Exception $e) {
42 42
         }
43 43
 
44 44
         $this->_conn->executeUpdate('DELETE FROM master_slave_table');
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/WriteTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             $table->setPrimaryKey(array('id'));
23 23
 
24 24
             $this->_conn->getSchemaManager()->createTable($table);
25
-        } catch(\Exception $e) {
25
+        } catch (\Exception $e) {
26 26
 
27 27
         }
28 28
         $this->_conn->executeUpdate('DELETE FROM write_table');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $sequence = new \Doctrine\DBAL\Schema\Sequence('write_table_id_seq');
162 162
         try {
163 163
             $this->_conn->getSchemaManager()->createSequence($sequence);
164
-        } catch(\Exception $e) {
164
+        } catch (\Exception $e) {
165 165
         }
166 166
 
167 167
         $sequences = $this->_conn->getSchemaManager()->listSequences();
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             $this->markTestSkipped("Test only works consistently on platforms that support sequences and don't support identity columns.");
185 185
         }
186 186
 
187
-        self::assertFalse($this->_conn->lastInsertId( null ));
187
+        self::assertFalse($this->_conn->lastInsertId(null));
188 188
 
189 189
     }
190 190
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     {
257 257
         $platform = $this->_conn->getDatabasePlatform();
258 258
 
259
-        if ( ! ($platform->supportsIdentityColumns() || $platform->usesSequenceEmulatedIdentityColumns()) ) {
259
+        if ( ! ($platform->supportsIdentityColumns() || $platform->usesSequenceEmulatedIdentityColumns())) {
260 260
             $this->markTestSkipped(
261 261
                 'Test only works on platforms with identity columns or sequence emulated identity columns.'
262 262
             );
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 
269 269
         try {
270 270
             $this->_conn->getSchemaManager()->dropTable($table->getQuotedName($platform));
271
-        } catch(\Exception $e) { }
271
+        } catch (\Exception $e) { }
272 272
 
273 273
         foreach ($platform->getCreateTableSQL($table) as $sql) {
274 274
             $this->_conn->exec($sql);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         parent::setUp();
21 21
 
22
-        if ( !($this->_conn->getDriver() instanceof ExceptionConverterDriver)) {
22
+        if ( ! ($this->_conn->getDriver() instanceof ExceptionConverterDriver)) {
23 23
             $this->markTestSkipped('Driver does not support special exception handling.');
24 24
         }
25 25
     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $platform = $this->_conn->getDatabasePlatform();
166 166
 
167
-        if (!$platform->supportsForeignKeyConstraints()) {
167
+        if ( ! $platform->supportsForeignKeyConstraints()) {
168 168
             $this->markTestSkipped("Only fails on platforms with foreign key constraints.");
169 169
         }
170 170
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             $this->markTestSkipped("Only fails this way on sqlite");
287 287
         }
288 288
 
289
-        $filename = sprintf('%s/%s', sys_get_temp_dir(), 'doctrine_failed_connection_'.$mode.'.db');
289
+        $filename = sprintf('%s/%s', sys_get_temp_dir(), 'doctrine_failed_connection_' . $mode . '.db');
290 290
 
291 291
         if (file_exists($filename)) {
292 292
             chmod($filename, 0200); // make the file writable again, so it can be removed on Windows
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL421Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
         parent::setUp();
15 15
 
16 16
         $platform = $this->_conn->getDatabasePlatform()->getName();
17
-        if (!in_array($platform, array('mysql', 'sqlite'))) {
17
+        if ( ! in_array($platform, array('mysql', 'sqlite'))) {
18 18
             $this->markTestSkipped('Currently restricted to MySQL and SQLite.');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
         $platform = $this->_conn->getDatabasePlatform()->getName();
25 25
 
26
-        if (!in_array($platform, array('postgresql'))) {
26
+        if ( ! in_array($platform, array('postgresql'))) {
27 27
             $this->markTestSkipped('Currently restricted to PostgreSQL');
28 28
         }
29 29
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL752Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
         $platform = $this->_conn->getDatabasePlatform()->getName();
16 16
 
17
-        if (!in_array($platform, array('sqlite'))) {
17
+        if ( ! in_array($platform, array('sqlite'))) {
18 18
             $this->markTestSkipped('Related to SQLite only');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/Schema/OracleSchemaManagerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
     {
15 15
         parent::setUp();
16 16
 
17
-        if(!isset($GLOBALS['db_username'])) {
17
+        if ( ! isset($GLOBALS['db_username'])) {
18 18
             $this->markTestSkipped('Foo');
19 19
         }
20 20
 
21 21
         $username = $GLOBALS['db_username'];
22 22
 
23
-        $query = "GRANT ALL PRIVILEGES TO ".$username;
23
+        $query = "GRANT ALL PRIVILEGES TO " . $username;
24 24
 
25 25
         $conn = \Doctrine\Tests\TestUtil::getTempConnection();
26 26
         $conn->executeUpdate($query);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -456,17 +456,17 @@
 block discarded – undo
456 456
         $this->_conn->query('DROP TABLE IF EXISTS test_column_defaults_with_create');
457 457
 
458 458
         $escapeSequences = [
459
-            "\\0",          // An ASCII NUL (X'00') character
460
-            "\\'", "''",    // Single quote
461
-            '\\"', '""',    // Double quote
462
-            '\\b',          // A backspace character
463
-            '\\n',          // A new-line character
464
-            '\\r',          // A carriage return character
465
-            '\\t',          // A tab character
466
-            '\\Z',          // ASCII 26 (Control+Z)
467
-            '\\\\',         // A backslash (\) character
468
-            '\\%',          // A percent (%) character
469
-            '\\_',          // An underscore (_) character
459
+            "\\0", // An ASCII NUL (X'00') character
460
+            "\\'", "''", // Single quote
461
+            '\\"', '""', // Double quote
462
+            '\\b', // A backspace character
463
+            '\\n', // A new-line character
464
+            '\\r', // A carriage return character
465
+            '\\t', // A tab character
466
+            '\\Z', // ASCII 26 (Control+Z)
467
+            '\\\\', // A backslash (\) character
468
+            '\\%', // A percent (%) character
469
+            '\\_', // An underscore (_) character
470 470
         ];
471 471
 
472 472
         $default = implode('+', $escapeSequences);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     public function testCreateAndDropDatabase()
25 25
     {
26
-        $path = dirname(__FILE__).'/test_create_and_drop_sqlite_database.sqlite';
26
+        $path = dirname(__FILE__) . '/test_create_and_drop_sqlite_database.sqlite';
27 27
 
28 28
         $this->_sm->createDatabase($path);
29 29
         self::assertFileExists($path);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         }
146 146
 
147 147
         $version = \SQLite3::version();
148
-        if(version_compare($version['versionString'], '3.7.16', '<')) {
148
+        if (version_compare($version['versionString'], '3.7.16', '<')) {
149 149
             $this->markTestSkipped('This version of sqlite doesn\'t return the order of the Primary Key.');
150 150
         }
151 151
         $this->_conn->exec(<<<EOS
Please login to merge, or discard this patch.