Browse Source

Combine conditions, #13698

bancer 6 years ago
parent
commit
c25d29ea10
1 changed files with 5 additions and 7 deletions
  1. 5 7
      src/Database/Schema/MysqlSchema.php

+ 5 - 7
src/Database/Schema/MysqlSchema.php

@@ -389,13 +389,11 @@ class MysqlSchema extends BaseSchema
         }
 
         $hasPrecision = [TableSchema::TYPE_FLOAT, TableSchema::TYPE_DECIMAL];
-        if (in_array($data['type'], $hasPrecision, true)) {
-            if (isset($data['length'])) {
-                if (isset($data['precision'])) {
-                    $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')';
-                } else {
-                    $out .= '(' . (int)$data['length'] . ')';
-                }
+        if (in_array($data['type'], $hasPrecision, true) && isset($data['length'])) {
+            if (isset($data['precision'])) {
+                $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')';
+            } else {
+                $out .= '(' . (int)$data['length'] . ')';
             }
         }