Browse Source

some renaming

dev
Cerys 3 weeks ago
parent
commit
265bca9744
  1. 2
      src/QueryBuilder/LinkQuery/LinkQueryBuilder.php
  2. 11
      src/QueryBuilder/UnlinkQuery/UnlinkQueryBuilder.php
  3. 12
      tests/QueryBuilderLinkTest.php

2
src/QueryBuilder/LinkQuery/LinkQueryBuilder.php

@ -56,7 +56,7 @@ class LinkQueryBuilder
public function PropertyName(string $propertyName): LinkQueryBuilder
public function As(string $propertyName): LinkQueryBuilder
{
$this->PropertyName = $propertyName;
return $this;

11
src/QueryBuilder/UnlinkQuery/UnlinkQueryBuilder.php

@ -23,25 +23,22 @@ class UnlinkQueryBuilder
protected string $RelativePath = "";
public function PropertyName(string $propertyName): UnlinkQueryBuilder
public function UnlinkWhat(string $propertyName): UnlinkQueryBuilder
{
$this->PropertyName = $propertyName;
return $this;
}
public function From(): UnlinkQueryBuilder
public function From(string $relativePath): UnlinkQueryBuilder
{
self::EnsureNotSet($this->Mode);
$this->Mode = "FROM";
$this->RelativePath = $relativePath;
return $this;
}
public function Of(): UnlinkQueryBuilder
public function Of(string $relativePath): UnlinkQueryBuilder
{
self::EnsureNotSet($this->Mode);
$this->Mode = "OF";
return $this;
}
public function RelativePath(string $relativePath): UnlinkQueryBuilder
{
$this->RelativePath = $relativePath;
return $this;
}

12
tests/QueryBuilderLinkTest.php

@ -16,7 +16,7 @@ final class QueryBuilderLinkTest extends TestCase
actual: QueryBuilder::Link()
->LinkWhat($this->TestUUID)
->LinkTo($this->TestUUID)
->PropertyName("test")
->As("test")
->Build()
);
}
@ -27,7 +27,7 @@ final class QueryBuilderLinkTest extends TestCase
actual: QueryBuilder::Link()
->LinkWhat($this->TestUUID)
->LinkTo($this->TestUUID)
->PropertyName("test")
->As("test")
->Overwrite()
->Build()
);
@ -39,7 +39,7 @@ final class QueryBuilderLinkTest extends TestCase
actual: QueryBuilder::Link()
->LinkWhat($this->TestUUID)
->LinkTo($this->TestUUID)
->PropertyName("test")
->As("test")
->Replace()
->Build()
);
@ -51,7 +51,7 @@ final class QueryBuilderLinkTest extends TestCase
actual: QueryBuilder::Link()
->LinkWhat($this->TestUUID)
->LinkTo($this->TestUUID)
->PropertyName("test")
->As("test")
->Force()
->Build()
);
@ -63,7 +63,7 @@ final class QueryBuilderLinkTest extends TestCase
actual: QueryBuilder::Link()
->LinkWhat($this->TestUUID)
->LinkOf($this->TestUUID)
->PropertyName("test")
->As("test")
->Build()
);
}
@ -75,7 +75,7 @@ final class QueryBuilderLinkTest extends TestCase
actual: QueryBuilder::Link()
->LinkWhat($this->TestUUID)
->LinkOf($this->TestUUID)
->PropertyName("test")
->As("test")
->Overwrite()
->Replace()
->Force()

Loading…
Cancel
Save