Browse Source

now validates

dev
Cerys 4 weeks ago
parent
commit
22d2a1c760
  1. 8
      src/QueryBuilder/PermissionsQuery/PermissionQueryBuilder.php

8
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);

Loading…
Cancel
Save