Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
michealmouner committed Dec 1, 2020
1 parent 786fdd7 commit 6edda50
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Command/H5pBundleIncludeAssetsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
return 0;
}

private function includeAssets(bool $relative)
private function includeAssets(bool $copy)
{
//get dir of vendor H5P

Expand All @@ -53,21 +53,21 @@ private function includeAssets(bool $relative)

$coreSubDir = "h5p-core/";
$coreDirs = ["fonts", "images", "js", "styles"];
$this->createFiles($fromDir, $toDir, $coreSubDir, $coreDirs, $relative);
$this->createFiles($fromDir, $toDir, $coreSubDir, $coreDirs, $copy);

$editorSubDir = "h5p-editor/";
$editorDirs = ["ckeditor", "images", "language", "libs", "scripts", "styles"];
$this->createFiles($fromDir, $toDir, $editorSubDir, $editorDirs, $relative);
$this->createFiles($fromDir, $toDir, $editorSubDir, $editorDirs, $copy);

}

private function createFiles($fromDir, $toDir, $subDir, $subDirs, $relative)
private function createFiles($fromDir, $toDir, $subDir, $subDirs, $copy)
{
foreach ($subDirs as $dir) {
$src = $fromDir . $subDir . $dir;
$dist = $toDir . $subDir . $dir;

$relative
$copy
? $this->recurseCopy($src, $dist)
: symlink($src, $dist);
}
Expand Down

0 comments on commit 6edda50

Please sign in to comment.