PMCORE-3845 Check and made the recommend changes in the Laravel upgrade guide

This commit is contained in:
Roly Gutierrez
2022-06-09 11:12:28 -04:00
committed by Mauricio Veliz
parent 6d1d7d752e
commit d0c5a23d67
10 changed files with 140 additions and 99 deletions

View File

@@ -727,3 +727,14 @@ function calculateDate($iniDate, $timeUnit, $time)
return $datetime->format('Y-m-d H:i:s');
}
/**
* Get the constant value.
* @param string $name
* @param mixed $default
* @return mixed
*/
function getConstant(string $name, $default = '')
{
return defined($name) === true ? constant($name) : $default;
}