Test Failed
Pull Request — master (#66)
by Wilmer
10:21 queued 07:50
created
src/Schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
         $tables = $this->getDb()->createCommand($sql, [':schema' => $schema])->queryColumn();
223 223
 
224
-        $tables = array_map(static function ($item) {
224
+        $tables = array_map(static function($item) {
225 225
             return '[' . $item . ']';
226 226
         }, $tables);
227 227
 
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 SQL;
752 752
 
753 753
         $views = $this->getDb()->createCommand($sql, [':schema' => $schema])->queryColumn();
754
-        $views = array_map(static function ($item) {
754
+        $views = array_map(static function($item) {
755 755
             return '[' . $item . ']';
756 756
         }, $views);
757 757
 
Please login to merge, or discard this patch.
src/DMLQueryBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
                 $key = $this->queryBuilder->quoter()->quoteColumnName(reset($pk));
65 65
                 $value = "(SELECT COALESCE(MAX($key),0) FROM $tableName)+1";
66 66
             } else {
67
-                $value = (int)$value;
67
+                $value = (int) $value;
68 68
             }
69 69
 
70 70
             return "DBCC CHECKIDENT ('$tableName', RESEED, $value)";
Please login to merge, or discard this patch.
src/DDLQueryBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         /** @var SchemaPDOMssql */
68 68
         $schemaInstance = $this->queryBuilder->schema();
69 69
         $defaultSchema = $schema ?: $schemaInstance->getDefaultSchema();
70
-        $tableNames =  $schemaInstance->getTableSchema($table)
70
+        $tableNames = $schemaInstance->getTableSchema($table)
71 71
              ? [$table] : $schemaInstance->getTableNames($defaultSchema);
72 72
         $viewNames = $schemaInstance->getViewNames($defaultSchema);
73 73
         $tableNames = array_diff($tableNames, $viewNames);
Please login to merge, or discard this patch.
src/QueryBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@
 block discarded – undo
311 311
                 $key = $this->getDb()->quoteColumnName(reset($pk));
312 312
                 $value = "(SELECT COALESCE(MAX({$key}),0) FROM {$tableName})+1";
313 313
             } else {
314
-                $value = (int)$value;
314
+                $value = (int) $value;
315 315
             }
316 316
 
317 317
             return "DBCC CHECKIDENT ('{$tableName}', RESEED, {$value})";
Please login to merge, or discard this patch.
src/PDO/SchemaPDOMssql.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 
243 243
         $tables = $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
244 244
 
245
-        return array_map(static function ($item) {
245
+        return array_map(static function($item) {
246 246
             return '[' . $item . ']';
247 247
         }, $tables);
248 248
     }
@@ -1039,12 +1039,12 @@  discard block
 block discarded – undo
1039 1039
      */
1040 1040
     protected function normalizePdoRowKeyCase(array $row, bool $multiple): array
1041 1041
     {
1042
-        if ($this->db->getSlavePdo()?->getAttribute(PDO::ATTR_CASE) !== PDO::CASE_UPPER) {
1042
+        if ($this->db->getSlavePdo() ? ->getAttribute(PDO::ATTR_CASE) !== PDO::CASE_UPPER) {
1043 1043
             return $row;
1044 1044
         }
1045 1045
 
1046 1046
         if ($multiple) {
1047
-            return array_map(static function (array $row) {
1047
+            return array_map(static function(array $row) {
1048 1048
                 return array_change_key_case($row, CASE_LOWER);
1049 1049
             }, $row);
1050 1050
         }
Please login to merge, or discard this patch.
src/PDO/ConnectionPDOMssql.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
 
116 116
         if ($this->pdo !== null) {
117
-            $this->logger?->log(
117
+            $this->logger ? ->log(
118 118
                 LogLevel::DEBUG,
119 119
                 'Closing DB connection: ' . $this->driver->getDsn() . ' ' . __METHOD__,
120 120
             );
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         if ($this->serverVersion === '') {
184 184
             /** @var mixed */
185
-            $version = $this->getSlavePDO()?->getAttribute(PDO::ATTR_SERVER_VERSION);
185
+            $version = $this->getSlavePDO() ? ->getAttribute(PDO::ATTR_SERVER_VERSION);
186 186
             $this->serverVersion = is_string($version) ? $version : 'Version could not be determined.';
187 187
         }
188 188
 
@@ -240,13 +240,13 @@  discard block
 block discarded – undo
240 240
         $token = 'Opening DB connection: ' . $this->driver->getDsn();
241 241
 
242 242
         try {
243
-            $this->logger?->log(LogLevel::INFO, $token);
244
-            $this->profiler?->begin($token, [__METHOD__]);
243
+            $this->logger ? ->log(LogLevel::INFO, $token);
244
+            $this->profiler ? ->begin($token, [__METHOD__]);
245 245
             $this->initConnection();
246
-            $this->profiler?->end($token, [__METHOD__]);
246
+            $this->profiler ? ->end($token, [__METHOD__]);
247 247
         } catch (PDOException $e) {
248
-            $this->profiler?->end($token, [__METHOD__]);
249
-            $this->logger?->log(LogLevel::ERROR, $token);
248
+            $this->profiler ? ->end($token, [__METHOD__]);
249
+            $this->logger ? ->log(LogLevel::ERROR, $token);
250 250
 
251 251
             throw new Exception($e->getMessage(), (array) $e->errorInfo, $e);
252 252
         }
Please login to merge, or discard this patch.
src/PDO/CommandPDOMssql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
                     && $this->isolationLevel !== null
81 81
                     && $this->db->getTransaction() === null
82 82
                 ) {
83
-                    $this->db->transaction(fn (string $rawSql) => $this->internalExecute($rawSql), $this->isolationLevel);
83
+                    $this->db->transaction(fn(string $rawSql) => $this->internalExecute($rawSql), $this->isolationLevel);
84 84
                 } else {
85 85
                     $this->pdoStatement->execute();
86 86
                 }
Please login to merge, or discard this patch.
src/PDO/TransactionPDOMssql.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
                 $this->db->getSchema()->setTransactionIsolationLevel($isolationLevel);
61 61
             }
62 62
 
63
-            $this->logger?->log(
63
+            $this->logger ? ->log(
64 64
                 LogLevel::DEBUG,
65 65
                 'Begin transaction' . ($isolationLevel ? ' with isolation level ' . $isolationLevel : '')
66 66
                 . ' ' . __METHOD__
67 67
             );
68 68
 
69
-            $this->db->getPDO()?->beginTransaction();
69
+            $this->db->getPDO() ? ->beginTransaction();
70 70
             $this->level = 1;
71 71
 
72 72
             return;
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
         $schema = $this->db->getSchema();
76 76
 
77 77
         if ($schema->supportsSavepoint()) {
78
-            $this->logger?->log(LogLevel::DEBUG, 'Set savepoint ' . $this->level . ' ' . __METHOD__);
78
+            $this->logger ? ->log(LogLevel::DEBUG, 'Set savepoint ' . $this->level . ' ' . __METHOD__);
79 79
             $schema->createSavepoint('LEVEL' . $this->level);
80 80
         } else {
81
-            $this->logger?->log(
81
+            $this->logger ? ->log(
82 82
                 LogLevel::DEBUG,
83 83
                 'Transaction not started: nested transaction not supported ' . __METHOD__
84 84
             );
@@ -102,18 +102,18 @@  discard block
 block discarded – undo
102 102
         $this->level--;
103 103
 
104 104
         if ($this->level === 0) {
105
-            $this->logger?->log(LogLevel::DEBUG, 'Commit transaction ' . __METHOD__);
106
-            $this->db->getPDO()?->commit();
105
+            $this->logger ? ->log(LogLevel::DEBUG, 'Commit transaction ' . __METHOD__);
106
+            $this->db->getPDO() ? ->commit();
107 107
             return;
108 108
         }
109 109
 
110 110
         $schema = $this->db->getSchema();
111 111
 
112 112
         if ($schema->supportsSavepoint()) {
113
-            $this->logger?->log(LogLevel::DEBUG, 'Release savepoint ' . $this->level . ' ' . __METHOD__);
113
+            $this->logger ? ->log(LogLevel::DEBUG, 'Release savepoint ' . $this->level . ' ' . __METHOD__);
114 114
             $schema->releaseSavepoint('LEVEL' . $this->level);
115 115
         } else {
116
-            $this->logger?->log(
116
+            $this->logger ? ->log(
117 117
                 LogLevel::INFO,
118 118
                 'Transaction not committed: nested transaction not supported ' . __METHOD__
119 119
             );
@@ -145,17 +145,17 @@  discard block
 block discarded – undo
145 145
 
146 146
         $this->level--;
147 147
         if ($this->level === 0) {
148
-            $this->logger?->log(LogLevel::INFO, 'Roll back transaction ' . __METHOD__);
149
-            $this->db->getPDO()?->rollBack();
148
+            $this->logger ? ->log(LogLevel::INFO, 'Roll back transaction ' . __METHOD__);
149
+            $this->db->getPDO() ? ->rollBack();
150 150
             return;
151 151
         }
152 152
 
153 153
         $schema = $this->db->getSchema();
154 154
         if ($schema->supportsSavepoint()) {
155
-            $this->logger?->log(LogLevel::DEBUG, 'Roll back to savepoint ' . $this->level . ' ' . __METHOD__);
155
+            $this->logger ? ->log(LogLevel::DEBUG, 'Roll back to savepoint ' . $this->level . ' ' . __METHOD__);
156 156
             $schema->rollBackSavepoint('LEVEL' . $this->level);
157 157
         } else {
158
-            $this->logger?->log(
158
+            $this->logger ? ->log(
159 159
                 LogLevel::INFO,
160 160
                 'Transaction not rolled back: nested transaction not supported ' . __METHOD__
161 161
             );
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             throw new Exception('Failed to set isolation level: transaction was inactive.');
169 169
         }
170 170
 
171
-        $this->logger?->log(
171
+        $this->logger ? ->log(
172 172
             LogLevel::DEBUG,
173 173
             'Setting transaction isolation level to ' . $this->level . ' ' . __METHOD__
174 174
         );
Please login to merge, or discard this patch.