mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 08:28:42 +00:00
Ditch using an enum, use class
This commit is contained in:
parent
4c56de8348
commit
fb474734fe
2 changed files with 10 additions and 11 deletions
|
|
@ -3,22 +3,22 @@
|
|||
use Appwrite\Functions\Specifications;
|
||||
|
||||
return [
|
||||
Specifications::S_1VCPU_512MB->value => [
|
||||
Specifications::$S_1VCPU_512MB => [
|
||||
'slug' => 's-1vcpu-512mb',
|
||||
'memory' => 512,
|
||||
'cpus' => 1
|
||||
],
|
||||
Specifications::S_1VCPU_1GB->value => [
|
||||
Specifications::$S_1VCPU_1GB => [
|
||||
'slug' => 's-1vcpu-1gb',
|
||||
'memory' => 1024,
|
||||
'cpus' => 1
|
||||
],
|
||||
Specifications::S_2VCPU_2GB->value => [
|
||||
Specifications::$S_2VCPU_2GB => [
|
||||
'slug' => 's-2vcpu-2gb',
|
||||
'memory' => 2048,
|
||||
'cpus' => 2
|
||||
],
|
||||
Specifications::S_2VCPU_4GB->value => [
|
||||
Specifications::$S_2VCPU_4GB => [
|
||||
'slug' => 's-2vcpu-4gb',
|
||||
'memory' => 4096,
|
||||
'cpus' => 2
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
namespace Appwrite\Functions;
|
||||
|
||||
enum Specifications: string
|
||||
{
|
||||
case S_1VCPU_512MB = 's-1vcpu-512mb';
|
||||
case S_1VCPU_1GB = 's-1vcpu-1gb';
|
||||
case S_2VCPU_2GB = 's-2vcpu-2gb';
|
||||
case S_2VCPU_4GB = 's-2vcpu-4gb';
|
||||
}
|
||||
class Specifications {
|
||||
static $S_1VCPU_512MB = 's-1vcpu-512mb';
|
||||
static $S_1VCPU_1GB = 's-1vcpu-1gb';
|
||||
static $S_2VCPU_2GB = 's-2vcpu-2gb';
|
||||
static $S_2VCPU_4GB = 's-2vcpu-4gb';
|
||||
}
|
||||
Loading…
Reference in a new issue