Convert BuildConstants constants to enum cases

This commit is contained in:
netkas 2024-09-14 08:35:16 -04:00
parent 492548d81f
commit 87a8ca24a1
2 changed files with 9 additions and 9 deletions

View file

@ -121,10 +121,10 @@
return str_replace(
[
BuildConstants::COMPILE_TIMESTAMP,
BuildConstants::NCC_BUILD_VERSION,
BuildConstants::NCC_BUILD_FLAGS,
BuildConstants::NCC_BUILD_BRANCH
BuildConstants::COMPILE_TIMESTAMP->value,
BuildConstants::NCC_BUILD_VERSION->value,
BuildConstants::NCC_BUILD_FLAGS->value,
BuildConstants::NCC_BUILD_BRANCH->value
],
[
time(),

View file

@ -22,25 +22,25 @@
namespace ncc\Enums\SpecialConstants;
final class BuildConstants
enum BuildConstants : string
{
/**
* The Unix Timestamp for when the package was compiled
*/
public const COMPILE_TIMESTAMP = '%COMPILE_TIMESTAMP%';
case COMPILE_TIMESTAMP = '%COMPILE_TIMESTAMP%';
/**
* The version of NCC that was used to compile the package
*/
public const NCC_BUILD_VERSION = '%NCC_BUILD_VERSION%';
case NCC_BUILD_VERSION = '%NCC_BUILD_VERSION%';
/**
* NCC Build Flags exploded into spaces
*/
public const NCC_BUILD_FLAGS = '%NCC_BUILD_FLAGS%';
case NCC_BUILD_FLAGS = '%NCC_BUILD_FLAGS%';
/**
* NCC Build Branch
*/
public const NCC_BUILD_BRANCH = '%NCC_BUILD_BRANCH%';
case NCC_BUILD_BRANCH = '%NCC_BUILD_BRANCH%';
}