Passed
Branch tests-better-coverage (52d7f0)
by Michael
04:07
created
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $errorCode = null;
41 41
 
42 42
         foreach ($errors as $error) {
43
-            $message .= "SQLSTATE [".$error['SQLSTATE'].", ".$error['code']."]: ". $error['message']."\n";
43
+            $message .= "SQLSTATE [" . $error['SQLSTATE'] . ", " . $error['code'] . "]: " . $error['message'] . "\n";
44 44
 
45 45
             if (null === $sqlState) {
46 46
                 $sqlState = $error['SQLSTATE'];
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function bindValue($param, $value, $type = ParameterType::STRING)
168 168
     {
169
-        if (!is_numeric($param)) {
169
+        if ( ! is_numeric($param)) {
170 170
             throw new SQLSrvException(
171 171
                 'sqlsrv does not support named parameters to queries, use question mark (?) placeholders instead.'
172 172
             );
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null)
183 183
     {
184
-        if (!is_numeric($column)) {
184
+        if ( ! is_numeric($column)) {
185 185
             throw new SQLSrvException("sqlsrv does not support named parameters to queries, use question mark (?) placeholders instead.");
186 186
         }
187 187
 
188
-        $this->variables[$column] =& $variable;
188
+        $this->variables[$column] = & $variable;
189 189
         $this->types[$column] = $type;
190 190
 
191 191
         // unset the statement resource if it exists as the new one will need to be bound to the new variable
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     public function closeCursor()
199 199
     {
200 200
         // not having the result means there's nothing to close
201
-        if (!$this->result) {
201
+        if ( ! $this->result) {
202 202
             return true;
203 203
         }
204 204
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             $this->stmt = $this->prepare();
260 260
         }
261 261
 
262
-        if (!sqlsrv_execute($this->stmt)) {
262
+        if ( ! sqlsrv_execute($this->stmt)) {
263 263
             throw SQLSrvException::fromSqlSrvErrors();
264 264
         }
265 265
 
@@ -291,13 +291,13 @@  discard block
 block discarded – undo
291 291
                     SQLSRV_SQLTYPE_VARBINARY('max'),
292 292
                 ];
293 293
             } else {
294
-                $params[$column - 1] =& $variable;
294
+                $params[$column - 1] = & $variable;
295 295
             }
296 296
         }
297 297
 
298 298
         $stmt = sqlsrv_prepare($this->conn, $this->sql, $params);
299 299
 
300
-        if (!$stmt) {
300
+        if ( ! $stmt) {
301 301
             throw SQLSrvException::fromSqlSrvErrors();
302 302
         }
303 303
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
     {
334 334
         // do not try fetching from the statement if it's not expected to contain result
335 335
         // in order to prevent exceptional situation
336
-        if (!$this->result) {
336
+        if ( ! $this->result) {
337 337
             return false;
338 338
         }
339 339
 
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/SQLSrv/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
33 33
     {
34
-        if (!isset($params['host'])) {
34
+        if ( ! isset($params['host'])) {
35 35
             throw new SQLSrvException("Missing 'host' in configuration for sqlsrv driver.");
36 36
         }
37 37
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $driverOptions['UID'] = $username;
52 52
         $driverOptions['PWD'] = $password;
53 53
 
54
-        if (!isset($driverOptions['ReturnDatesAsStrings'])) {
54
+        if ( ! isset($driverOptions['ReturnDatesAsStrings'])) {
55 55
             $driverOptions['ReturnDatesAsStrings'] = 1;
56 56
         }
57 57
 
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
              * - passing client_encoding via the 'options' param breaks pgbouncer support
60 60
              */
61 61
             if (isset($params['charset'])) {
62
-              $pdo->query('SET NAMES \''.$params['charset'].'\'');
62
+                $pdo->query('SET NAMES \''.$params['charset'].'\'');
63 63
             }
64 64
 
65 65
             return $pdo;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             );
48 48
 
49 49
             if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')
50
-                && (! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])
50
+                && ( ! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])
51 51
                     || true === $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES]
52 52
                 )
53 53
             ) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
              * - passing client_encoding via the 'options' param breaks pgbouncer support
60 60
              */
61 61
             if (isset($params['charset'])) {
62
-              $pdo->query('SET NAMES \''.$params['charset'].'\'');
62
+              $pdo->query('SET NAMES \'' . $params['charset'] . '\'');
63 63
             }
64 64
 
65 65
             return $pdo;
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $buildVersion = $versionParts['build'] ?? 0;
62 62
         $version      = $majorVersion . '.' . $minorVersion . '.' . $patchVersion . '.' . $buildVersion;
63 63
 
64
-        switch(true) {
64
+        switch (true) {
65 65
             case version_compare($version, '11.00.2100', '>='):
66 66
                 return new SQLServer2012Platform();
67 67
             case version_compare($version, '10.00.1600', '>='):
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
      */
162 162
     public function closeCursor()
163 163
     {
164
-        if (!sasql_stmt_reset($this->stmt)) {
164
+        if ( ! sasql_stmt_reset($this->stmt)) {
165 165
             throw SQLAnywhereException::fromSQLAnywhereError($this->conn, $this->stmt);
166 166
         }
167 167
 
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $host = $host ?: 'localhost';
88 88
         $port = $port ?: 2638;
89 89
 
90
-        if (! empty($server)) {
90
+        if ( ! empty($server)) {
91 91
             $server = ';ServerName=' . $server;
92 92
         }
93 93
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             ';PWD=' . $password .
100 100
             ';' . implode(
101 101
                 ';',
102
-                array_map(function ($key, $value) {
102
+                array_map(function($key, $value) {
103 103
                     return $key . '=' . $value;
104 104
                 }, array_keys($driverOptions), $driverOptions)
105 105
             );
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,12 +56,12 @@
 block discarded – undo
56 56
             $dsn .= $params['host'];
57 57
         }
58 58
 
59
-        if (isset($params['port']) && !empty($params['port'])) {
59
+        if (isset($params['port']) && ! empty($params['port'])) {
60 60
             $dsn .= ',' . $params['port'];
61 61
         }
62 62
 
63 63
         if (isset($params['dbname'])) {
64
-            $dsn .= ';Database=' .  $params['dbname'];
64
+            $dsn .= ';Database=' . $params['dbname'];
65 65
         }
66 66
 
67 67
         if (isset($params['MultipleActiveResultSets'])) {
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
         $patchVersion = $versionParts['patch'] ?? 0;
117 117
         $version      = $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
118 118
 
119
-        switch(true) {
119
+        switch (true) {
120 120
             case version_compare($version, '10.0', '>='):
121 121
                 return new PostgreSQL100Platform();
122 122
             case version_compare($version, '9.4', '>='):
Please login to merge, or discard this patch.