Completed
Push — master ( c2ad7f...7da5cb )
by Gabriel
01:32
created
src/TableDumper.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function dumpCreateStatement(PDO $db, $stream): void 
160 160
     {
161
-        if(!$this->hasStructure()) return;
161
+        if (!$this->hasStructure()) return;
162 162
 
163 163
         $stmt = $db->query('SHOW CREATE TABLE `'.$this->table->getName().'`');
164 164
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function dumpDropStatement($stream): void
178 178
     {
179
-        if(!$this->hasDrop()) return;
179
+        if (!$this->hasDrop()) return;
180 180
 
181 181
         fwrite($stream, 'DROP TABLE IF EXISTS `'.$this->table->getName()."`;\r\n");
182 182
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function dumpInsertStatement(PDO $db, $stream): void
193 193
     {
194
-        if(!$this->hasData()) return;
194
+        if (!$this->hasData()) return;
195 195
 
196 196
         $dataDumper = new TableDataDumper($this);
197 197
         $dataDumper->dump($db, $stream);
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -158,7 +158,9 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function dumpCreateStatement(PDO $db, $stream): void 
160 160
     {
161
-        if(!$this->hasStructure()) return;
161
+        if(!$this->hasStructure()) {
162
+            return;
163
+        }
162 164
 
163 165
         $stmt = $db->query('SHOW CREATE TABLE `'.$this->table->getName().'`');
164 166
 
@@ -176,7 +178,9 @@  discard block
 block discarded – undo
176 178
      */
177 179
     public function dumpDropStatement($stream): void
178 180
     {
179
-        if(!$this->hasDrop()) return;
181
+        if(!$this->hasDrop()) {
182
+            return;
183
+        }
180 184
 
181 185
         fwrite($stream, 'DROP TABLE IF EXISTS `'.$this->table->getName()."`;\r\n");
182 186
     }
@@ -191,7 +195,9 @@  discard block
 block discarded – undo
191 195
      */
192 196
     public function dumpInsertStatement(PDO $db, $stream): void
193 197
     {
194
-        if(!$this->hasData()) return;
198
+        if(!$this->hasData()) {
199
+            return;
200
+        }
195 201
 
196 202
         $dataDumper = new TableDataDumper($this);
197 203
         $dataDumper->dump($db, $stream);
Please login to merge, or discard this patch.
src/TableDataDumper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
         $stmt = $db->prepare($select);
53 53
 
54
-        if(!($stmt instanceof PDOStatement)) {
54
+        if (!($stmt instanceof PDOStatement)) {
55 55
             throw new RuntimeException("Error occured preparing SELECT statement");
56 56
         }
57 57
 
Please login to merge, or discard this patch.
src/SQLDumper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
     {
171 171
         $stream = @fopen($filename, 'w');
172 172
 
173
-        if($stream === false) {
173
+        if ($stream === false) {
174 174
             throw new RuntimeException("Could not read provided file");
175 175
         }
176 176
         
Please login to merge, or discard this patch.