Skip to content
Snippets Groups Projects
Commit bf20bdd5 authored by JediKev's avatar JediKev
Browse files

cli: Package Better Wording

This updates the variable name that determines if the current PHP version is
5.6+ from `$php56` to `$php56plus`. This will help other understand better
what the variable is/does.
parent 4bf11e65
No related branches found
No related tags found
No related merge requests found
......@@ -108,8 +108,8 @@ class Packager extends Deployment {
if (!$zip->open($name, ZipArchive::CREATE | ZipArchive::OVERWRITE) === true)
return false;
$php56 = version_compare(phpversion(), '5.6.0', '>');
$addFiles = function($dir) use (&$addFiles, $zip, $path, $php56) {
$php56plus = version_compare(phpversion(), '5.6.0', '>');
$addFiles = function($dir) use (&$addFiles, $zip, $path, $php56plus) {
$files = array_diff(scandir($dir), array('.','..'));
$path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
foreach ($files as $file) {
......@@ -122,7 +122,7 @@ class Packager extends Deployment {
// out of OS open file handles
$zip->addFromString($local, file_get_contents($full));
// This only works on PHP >= v5.6
if ($php56) {
if ($php56plus) {
// Set the Unix mode of the file
$stat = stat($full);
$zip->setExternalAttributesName($local, ZipArchive::OPSYS_UNIX, $stat['mode'] << 16);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment