Skip to content

Commit

Permalink
Fix code formatting and spacing issues
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Zielinski <adam@adamziel.com>
  • Loading branch information
artemiomorales and adamziel authored Feb 24, 2023
1 parent 429f07b commit a969224
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/wordpress-playground/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,21 @@ function generateZipFile($exportPath, $databasePath, $docRoot) {
$dir = array_pop($directories);

if ($handle = opendir($dir)) {

while (false !== ($entry = readdir($handle))) {

if ($entry == '.' ||
$entry == '..') {
if ($entry == '.' || $entry == '..') {
continue;
}

$entry = $dir . $entry;

if (is_dir($entry) &&
if (
is_dir($entry) &&
strpos($entry, 'wp-content/database') == false &&
strpos($entry, 'wp-includes') == false) {

strpos($entry, 'wp-includes') == false
) {
$directory_path = $entry . '/';
array_push($directories, $directory_path);

} elseif (is_file($entry)) {

} else if (is_file($entry)) {
$zip->addFile($entry);
}
}
Expand Down Expand Up @@ -69,4 +65,4 @@ function importZipFile($pathToZip) {
}
$zip->close();
}
}
}

0 comments on commit a969224

Please sign in to comment.