Skip to content

Commit

Permalink
Scrutinizer Auto-Fixes
Browse files Browse the repository at this point in the history
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
  • Loading branch information
scrutinizer-auto-fixer authored and ifsnop committed Feb 12, 2020
1 parent 06c78a7 commit b9860da
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/Ifsnop/Mysqldump/Mysqldump.php
Original file line number Diff line number Diff line change
Expand Up @@ -1480,39 +1480,39 @@ public function close()

class CompressGzipstream extends CompressManagerFactory
{
private $fileHandler = null;
private $fileHandler = null;

private $compressContext;
private $compressContext;

/**
* @param string $filename
*/
public function open($filename)
{
/**
* @param string $filename
*/
public function open($filename)
{
$this->fileHandler = fopen($filename, "wb");
if (false === $this->fileHandler) {
throw new Exception("Output file is not writable");
throw new Exception("Output file is not writable");
}

$this->compressContext = deflate_init(ZLIB_ENCODING_GZIP, array('level' => 9));
return true;
}
}

public function write($str)
{
public function write($str)
{

$bytesWritten = fwrite($this->fileHandler, deflate_add($this->compressContext, $str, ZLIB_NO_FLUSH));
if (false === $bytesWritten) {
throw new Exception("Writting to file failed! Probably, there is no more free space left?");
throw new Exception("Writting to file failed! Probably, there is no more free space left?");
}
return $bytesWritten;
}
}

public function close()
{
public function close()
{
fwrite($this->fileHandler, deflate_add($this->compressContext, '', ZLIB_FINISH));
return fclose($this->fileHandler);
}
}
}

/**
Expand Down Expand Up @@ -1964,7 +1964,7 @@ public function create_procedure($row)
"Please check 'https://bugs.mysql.com/bug.php?id=14564'");
}
$procedureStmt = $row['Create Procedure'];
if ( $this->dumpSettings['skip-definer'] ) {
if ($this->dumpSettings['skip-definer']) {
if ($procedureStmtReplaced = preg_replace(
'/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(PROCEDURE\s.*)$/s',
'\1 \3',
Expand Down Expand Up @@ -2154,7 +2154,7 @@ public function setup_transaction()

public function start_transaction()
{
return "START TRANSACTION " .
return "START TRANSACTION ".
"/*!40100 WITH CONSISTENT SNAPSHOT */";
}

Expand Down

0 comments on commit b9860da

Please sign in to comment.