From 265bca9744bfa133bee12739a6e4826579c5d302 Mon Sep 17 00:00:00 2001 From: Cerys Date: Sun, 1 Dec 2024 16:59:35 +0000 Subject: [PATCH] some renaming --- src/QueryBuilder/LinkQuery/LinkQueryBuilder.php | 2 +- src/QueryBuilder/UnlinkQuery/UnlinkQueryBuilder.php | 11 ++++------- tests/QueryBuilderLinkTest.php | 12 ++++++------ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/QueryBuilder/LinkQuery/LinkQueryBuilder.php b/src/QueryBuilder/LinkQuery/LinkQueryBuilder.php index 6301493..9bd03b6 100644 --- a/src/QueryBuilder/LinkQuery/LinkQueryBuilder.php +++ b/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; diff --git a/src/QueryBuilder/UnlinkQuery/UnlinkQueryBuilder.php b/src/QueryBuilder/UnlinkQuery/UnlinkQueryBuilder.php index aac417d..58c6142 100644 --- a/src/QueryBuilder/UnlinkQuery/UnlinkQueryBuilder.php +++ b/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; } diff --git a/tests/QueryBuilderLinkTest.php b/tests/QueryBuilderLinkTest.php index 09f74c5..a1deb9c 100644 --- a/tests/QueryBuilderLinkTest.php +++ b/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()