Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Mar 3, 2018
1 parent 6ca566a commit 5a7028e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Empty file modified bin/generate_default_stub
100644 → 100755
Empty file.
10 changes: 7 additions & 3 deletions src/Box.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace KevinGH\Box;

use Assert\Assertion;
use const DIRECTORY_SEPARATOR;
use Humbug\PhpScoper\Console\Configuration as PhpScoperConfiguration;
use function is_file;
use KevinGH\Box\Compactor\PhpScoper;
use KevinGH\Box\Composer\ComposerOrchestrator;
use Phar;
Expand All @@ -26,6 +26,7 @@
use function Amp\Promise\wait;
use function array_map;
use function chdir;
use function is_file;
use function KevinGH\Box\FileSystem\copy;
use function KevinGH\Box\FileSystem\dump_file;
use function KevinGH\Box\FileSystem\file_contents;
Expand Down Expand Up @@ -393,10 +394,13 @@ function (string $file): bool {
)
);

$sourceMainScript = self::DEBUG_DIR.DIRECTORY_SEPARATOR.$mainScript;
$targetMainScript = $tmp.DIRECTORY_SEPARATOR.$mainScript;

if (is_file($mainScript)) {
copy($mainScript, $tmp . '/' . $mainScript);
copy($sourceMainScript, $targetMainScript);
} else {
rename($mainScript, $tmp . '/' . $mainScript);
rename($sourceMainScript, $targetMainScript);
}

rename($tmp, self::DEBUG_DIR, true);
Expand Down

0 comments on commit 5a7028e

Please sign in to comment.