Passed
Push — master ( 0b8282...9ba7de )
by Chizhov
01:48
created
src/convert.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
       PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
136 136
     ];
137 137
     try {
138
-      $this->db = new PDO("mysql:host=".$this->config["db_host"].";port=".$this->config["db_port"].";dbname=" . $this->config["db_name"],
138
+      $this->db = new PDO("mysql:host=".$this->config["db_host"].";port=".$this->config["db_port"].";dbname=".$this->config["db_name"],
139 139
                            $this->config["db_username"], $this->config["db_password"], $db_options);
140 140
     }
141 141
     catch (PDOException $e) {
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     $this->column_fixes = [];
243 243
     $sql_keys = [];
244 244
     $sql_values = [];
245
-    foreach($this->dbfColumns as $column) {
245
+    foreach ($this->dbfColumns as $column) {
246 246
       $sql_keys[] = "`".$column["name"]."`";
247 247
       $sql_values[] = ":".$column["name"];
248 248
       if (in_array($column["type"], ["F", "N", "I", "Y", "0"])) {
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
     $this->writeLog("\nCalculate column types for table <yellow>".$this->dbfHeaders["table"]."<default>");
315 315
     $lines = [];
316 316
     foreach ($this->dbfColumns as $column) {
317
-      if (in_array($column["type"], ["F", "N",  "I", "Y", "0"])) {
317
+      if (in_array($column["type"], ["F", "N", "I", "Y", "0"])) {
318 318
         $result = $this->column_fixes[$column["name"]];
319 319
         $unsigned = !($result["min"] < 0);
320 320
         if ($unsigned) {
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
                         "table" => $this->dbfHeaders["table"],
375 375
                         "column" => $this->config["key_field"]]);
376 376
       if ($result->rowCount()) {
377
-        $this->db->exec("ALTER TABLE `" . $this->dbfHeaders["table"] . "` ADD INDEX(`" . $this->config["key_field"] . "`)");
377
+        $this->db->exec("ALTER TABLE `".$this->dbfHeaders["table"]."` ADD INDEX(`".$this->config["key_field"]."`)");
378 378
       }
379 379
     }
380 380
   }
@@ -384,13 +384,11 @@  discard block
 block discarded – undo
384 384
     if ($this->percent <> !$percent) {
385 385
       $this->percent = $percent;
386 386
       $part1 = (($percent < 25) ?
387
-          $this->colors["white"].str_repeat("H", $percent).$this->colors["default"].$this->colors["red"].str_repeat(".", 25 - $percent) :
388
-          $this->colors["white"].str_repeat("H", 25)).$this->colors["default"];
387
+          $this->colors["white"].str_repeat("H", $percent).$this->colors["default"].$this->colors["red"].str_repeat(".", 25 - $percent) : $this->colors["white"].str_repeat("H", 25)).$this->colors["default"];
389 388
       if ($percent > 25) {
390 389
         $percent = $percent - 25;
391 390
         $part2 = (($percent < 50) ?
392
-            $this->colors["white"].str_repeat("H", $percent).$this->colors["default"].$this->colors["red"].str_repeat(".", 25 - $percent) :
393
-            $this->colors["white"].str_repeat("H", 25)).$this->colors["default"];
391
+            $this->colors["white"].str_repeat("H", $percent).$this->colors["default"].$this->colors["red"].str_repeat(".", 25 - $percent) : $this->colors["white"].str_repeat("H", 25)).$this->colors["default"];
394 392
       } else {
395 393
         $part2 = $this->colors["red"].str_repeat(".", 25).$this->colors["default"];
396 394
       }
Please login to merge, or discard this patch.