Completed
Pull Request — master (#184)
by Brad
04:56
created
src/Ifsnop/Mysqldump/Mysqldump.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1458,39 +1458,39 @@  discard block
 block discarded – undo
1458 1458
 
1459 1459
 class CompressGzipstream extends CompressManagerFactory
1460 1460
 {
1461
-  private $fileHandler = null;
1461
+    private $fileHandler = null;
1462 1462
 
1463
-  private $compressContext;
1463
+    private $compressContext;
1464 1464
 
1465
-  /**
1466
-   * @param string $filename
1467
-   */
1468
-  public function open($filename)
1469
-  {
1465
+    /**
1466
+     * @param string $filename
1467
+     */
1468
+    public function open($filename)
1469
+    {
1470 1470
     $this->fileHandler = fopen($filename, "wb");
1471 1471
     if (false === $this->fileHandler) {
1472
-      throw new Exception("Output file is not writable");
1472
+        throw new Exception("Output file is not writable");
1473 1473
     }
1474 1474
 
1475 1475
     $this->compressContext = deflate_init(ZLIB_ENCODING_GZIP, array('level' => 9));
1476 1476
     return true;
1477
-  }
1477
+    }
1478 1478
 
1479
-  public function write($str)
1480
-  {
1479
+    public function write($str)
1480
+    {
1481 1481
 
1482 1482
     $bytesWritten = fwrite($this->fileHandler, deflate_add($this->compressContext, $str, ZLIB_NO_FLUSH));
1483 1483
     if (false === $bytesWritten) {
1484
-      throw new Exception("Writting to file failed! Probably, there is no more free space left?");
1484
+        throw new Exception("Writting to file failed! Probably, there is no more free space left?");
1485 1485
     }
1486 1486
     return $bytesWritten;
1487
-  }
1487
+    }
1488 1488
 
1489
-  public function close()
1490
-  {
1489
+    public function close()
1490
+    {
1491 1491
     fwrite($this->fileHandler, deflate_add($this->compressContext, '', ZLIB_FINISH));
1492 1492
     return fclose($this->fileHandler);
1493
-  }
1493
+    }
1494 1494
 }
1495 1495
 
1496 1496
 /**
@@ -1760,7 +1760,7 @@  discard block
 block discarded – undo
1760 1760
 
1761 1761
     public function extractColumnName($colType)
1762 1762
     {
1763
-      return $colType['Field'];
1763
+        return $colType['Field'];
1764 1764
     }
1765 1765
 }
1766 1766
 
@@ -1791,7 +1791,7 @@  discard block
 block discarded – undo
1791 1791
 
1792 1792
     public function setup_transaction()
1793 1793
     {
1794
-      return "PRAGMA no_op";
1794
+        return "PRAGMA no_op";
1795 1795
     }
1796 1796
 }
1797 1797
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
                 'is_numeric'=> $types['is_numeric'],
820 820
                 'is_blob' => $types['is_blob'],
821 821
                 'type' => $types['type'],
822
-                'type_sql' => !empty($col['Type']) ? $col['Type']: $types['type'],
822
+                'type_sql' => !empty($col['Type']) ? $col['Type'] : $types['type'],
823 823
                 'is_virtual' => $types['is_virtual']
824 824
             );
825 825
         }
@@ -1966,7 +1966,7 @@  discard block
 block discarded – undo
1966 1966
                 "Please check 'https://bugs.mysql.com/bug.php?id=14564'");
1967 1967
         }
1968 1968
         $procedureStmt = $row['Create Procedure'];
1969
-        if ( $this->dumpSettings['skip-definer'] ) {
1969
+        if ($this->dumpSettings['skip-definer']) {
1970 1970
             if ($procedureStmtReplaced = preg_replace(
1971 1971
                 '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(PROCEDURE\s.*)$/s',
1972 1972
                 '\1 \3',
@@ -2000,7 +2000,7 @@  discard block
 block discarded – undo
2000 2000
         $characterSetClient = $row['character_set_client'];
2001 2001
         $collationConnection = $row['collation_connection'];
2002 2002
         $sqlMode = $row['sql_mode'];
2003
-        if ( $this->dumpSettings['skip-definer'] ) {
2003
+        if ($this->dumpSettings['skip-definer']) {
2004 2004
             if ($functionStmtReplaced = preg_replace(
2005 2005
                 '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(FUNCTION\s.*)$/s',
2006 2006
                 '\1 \3',
@@ -2156,7 +2156,7 @@  discard block
 block discarded – undo
2156 2156
 
2157 2157
     public function start_transaction()
2158 2158
     {
2159
-        return "START TRANSACTION " .
2159
+        return "START TRANSACTION ".
2160 2160
             "/*!40100 WITH CONSISTENT SNAPSHOT */";
2161 2161
     }
2162 2162
 
Please login to merge, or discard this patch.