The TryingToScale PHP framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
tts_framework/src/classes/enum/app_environment.php

18 lines
463 B

<?php
declare(strict_types=1);
namespace tts\enum;
enum app_environment: string {
case Development = 'development';
case Production = 'production';
public static function is_production(string $app_environment): bool {
return self::tryFrom($app_environment) === self::Production;
}
public static function is_development(string $app_environment): bool {
return self::tryFrom($app_environment) === self::Development;
}
}