Convert NccBuildFlags constants to enum cases
This commit is contained in:
parent
0c4ef17bbf
commit
863dffafe7
2 changed files with 5 additions and 5 deletions
|
@ -125,12 +125,12 @@
|
|||
Console::outDebug(sprintf('args: %s', json_encode(self::$args, JSON_UNESCAPED_SLASHES)));
|
||||
}
|
||||
|
||||
if(in_array(NccBuildFlags::UNSTABLE, NCC_VERSION_FLAGS, true))
|
||||
if(in_array(NccBuildFlags::UNSTABLE->value, NCC_VERSION_FLAGS, true))
|
||||
{
|
||||
Console::outWarning('This is an unstable build of ncc, expect some features to not work as expected');
|
||||
}
|
||||
|
||||
if(in_array(NccBuildFlags::BETA, NCC_VERSION_FLAGS, true))
|
||||
if(in_array(NccBuildFlags::BETA->value, NCC_VERSION_FLAGS, true))
|
||||
{
|
||||
Console::outWarning('This is a beta build of ncc, expect some features to not work as expected');
|
||||
}
|
||||
|
|
|
@ -22,16 +22,16 @@
|
|||
|
||||
namespace ncc\Enums\Flags;
|
||||
|
||||
final class NccBuildFlags
|
||||
enum NccBuildFlags : string
|
||||
{
|
||||
/**
|
||||
* Indicates if the build is currently unstable and some features may not work correctly
|
||||
* and can cause errors
|
||||
*/
|
||||
public const UNSTABLE = 'unstable';
|
||||
case UNSTABLE = 'unstable';
|
||||
|
||||
/**
|
||||
* Indicates if the build is currently in beta testing phase
|
||||
*/
|
||||
public const BETA = 'beta';
|
||||
case BETA = 'beta';
|
||||
}
|
Loading…
Add table
Reference in a new issue