This commit is contained in:
Daniil Gentili 2019-12-25 22:03:51 +01:00
parent 0bcef40328
commit eea6c966af
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 15 additions and 1 deletions

View File

@ -8,6 +8,20 @@ function returnMe($res)
{ {
return $res; return $res;
} }
function __coalesce($ifNotNull, $then) {
return $ifNotNull ? $ifNotNull : $then;
}
function __destructure($list, $value) {
$res = [];
foreach ($list as $key) {
if (is_string($key)) {
$res []= $value[$key];
} else {
$res = array_merge($res, __destructure($key, $value[$key]));
}
}
return $res;
}
if (!\function_exists('is_iterable')) { if (!\function_exists('is_iterable')) {
function is_iterable($var) function is_iterable($var)
{ {

View File

@ -51,7 +51,7 @@ cd ..
sudo apt-get update -q sudo apt-get update -q
sudo apt-get install php7.3-cli php7.3-json php7.3-mbstring php7.3-curl php7.3-xml php7.3-json -y sudo apt-get install php7.3-cli php7.3-json php7.3-mbstring php7.3-curl php7.3-xml php7.3-json -y
composer global require spatie/7to5 dev-master#d4be6d0 composer global require spatie/7to5 dev-master#0420ad3
[ -f $HOME/.composer/vendor/bin/php7to5 ] && php7to5=$HOME/.composer/vendor/bin/php7to5 [ -f $HOME/.composer/vendor/bin/php7to5 ] && php7to5=$HOME/.composer/vendor/bin/php7to5
[ -f $HOME/.config/composer/vendor/bin/php7to5 ] && php7to5=$HOME/.config/composer/vendor/bin/php7to5 [ -f $HOME/.config/composer/vendor/bin/php7to5 ] && php7to5=$HOME/.config/composer/vendor/bin/php7to5