From 22d2a1c760693310e53fb787c15720fa0867e575 Mon Sep 17 00:00:00 2001 From: Cerys Date: Thu, 28 Nov 2024 15:29:47 +0000 Subject: [PATCH] now validates --- .../PermissionsQuery/PermissionQueryBuilder.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/QueryBuilder/PermissionsQuery/PermissionQueryBuilder.php b/src/QueryBuilder/PermissionsQuery/PermissionQueryBuilder.php index d10d788..652bc34 100644 --- a/src/QueryBuilder/PermissionsQuery/PermissionQueryBuilder.php +++ b/src/QueryBuilder/PermissionsQuery/PermissionQueryBuilder.php @@ -22,13 +22,13 @@ final class PermissionQueryBuilder public function On(string $relativePath): PermissionQueryBuilder { - // self::ValidateDeegraphPath(target: $relativePath); + self::ValidateDeegraphPath(target: $relativePath); $this->On = $relativePath; return $this; } public function As(string $relativePath): PermissionQueryBuilder { - // self::ValidateDeegraphPath(target: $relativePath); + self::ValidateDeegraphPath(target: $relativePath); $this->As = $relativePath; return $this; } @@ -37,8 +37,8 @@ final class PermissionQueryBuilder { self::ValidateValues(target: $this); - $builder = "PERMISSIONS "; - if($this->On != "") $builder .= " ON {". $this->On . "}"; + $builder = "PERMISSIONS ON ". $this->On; + if($this->As != "") $builder .= " AS {". $this->As . "}"; return new PermissionQuery(queryString: $builder);