From 78d013c10958de7c9ac1ede4b909f3f286ca9772 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Mon, 16 Aug 2021 15:59:58 -0400 Subject: [PATCH] Prefix all attribute models with Attribute --- src/Appwrite/Utopia/Response.php | 16 +++++----------- .../Utopia/Response/Model/AttributeFloat.php | 4 ++-- .../Utopia/Response/Model/AttributeInteger.php | 4 ++-- .../Utopia/Response/Model/AttributeString.php | 2 +- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 297b9f5305..06c9375d0f 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -77,17 +77,11 @@ class Response extends SwooleResponse const MODEL_ATTRIBUTE = 'attribute'; const MODEL_ATTRIBUTE_LIST = 'attributeList'; const MODEL_ATTRIBUTE_STRING = 'attributeString'; - const MODEL_ATTRIBUTE_STRING_LIST = 'attributeStringList'; - const MODEL_INTEGER= 'integer'; - const MODEL_INTEGER_LIST= 'integerList'; - const MODEL_FLOAT= 'float'; - const MODEL_FLOAT_LIST= 'floatList'; - const MODEL_ATTRIBUTE_EMAIL= 'email'; - const MODEL_EMAIL_LIST= 'emailList'; - const MODEL_ATTRIBUTE_IP= 'ip'; - const MODEL_IP_LIST= 'ipList'; - const MODEL_ATTRIBUTE_URL= 'url'; - const MODEL_URL_LIST= 'urlList'; + const MODEL_ATTRIBUTE_INTEGER= 'attributeInteger'; + const MODEL_ATTRIBUTE_FLOAT= 'attributeFloat'; + const MODEL_ATTRIBUTE_EMAIL= 'attributeEmail'; + const MODEL_ATTRIBUTE_IP= 'attributeIp'; + const MODEL_ATTRIBUTE_URL= 'attributeUrl'; // Users const MODEL_USER = 'user'; diff --git a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php index bf9ca0f107..3320582b5c 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php @@ -36,7 +36,7 @@ class AttributeFloat extends Attribute */ public function getName():string { - return 'Float'; + return 'AttributeFloat'; } /** @@ -46,6 +46,6 @@ class AttributeFloat extends Attribute */ public function getType():string { - return Response::MODEL_FLOAT; + return Response::MODEL_ATTRIBUTE_FLOAT; } } \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/AttributeInteger.php b/src/Appwrite/Utopia/Response/Model/AttributeInteger.php index 5a5ec896cb..ee65d3a397 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeInteger.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeInteger.php @@ -36,7 +36,7 @@ class AttributeInteger extends Attribute */ public function getName():string { - return 'Integer'; + return 'AttributeInteger'; } /** @@ -46,6 +46,6 @@ class AttributeInteger extends Attribute */ public function getType():string { - return Response::MODEL_INTEGER; + return Response::MODEL_ATTRIBUTE_INTEGER; } } \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/AttributeString.php b/src/Appwrite/Utopia/Response/Model/AttributeString.php index c12de4395b..e7eb558b61 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeString.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeString.php @@ -26,7 +26,7 @@ class AttributeString extends Attribute */ public function getName():string { - return 'String'; + return 'AttributeString'; } /**