From 6e371adf69399eb203c661a6d38b1fafefe5a178 Mon Sep 17 00:00:00 2001 From: Cerys Date: Thu, 28 Nov 2024 15:24:38 +0000 Subject: [PATCH] thought doing it like this would make more sense --- .../PermissionsQuery/PermissionQueryResponse.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/QueryBuilder/PermissionsQuery/PermissionQueryResponse.php b/src/QueryBuilder/PermissionsQuery/PermissionQueryResponse.php index 3e0ae41..a2f3ebc 100644 --- a/src/QueryBuilder/PermissionsQuery/PermissionQueryResponse.php +++ b/src/QueryBuilder/PermissionsQuery/PermissionQueryResponse.php @@ -4,7 +4,7 @@ namespace Darksparrow\DeegraphInteractions\QueryBuilder\PermissionsQuery; final class PermissionQueryResponse { - public array $Permissions = []; + private array $AsArray = []; public bool $CanAct = false; public bool $CanDelete = false; @@ -15,7 +15,7 @@ final class PermissionQueryResponse { foreach ($deegraphResponse["@permissions"] as $permission) { - $this->Permissions[] = $permission; + $this->AsArray[] = $permission; switch($permission) { @@ -34,4 +34,9 @@ final class PermissionQueryResponse } } } -} \ No newline at end of file + + public function AsArray(): array + { + return $this->AsArray; + } +}