-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ classes
BasePostKey
, PostKeyWithParent
, (Sub)?Reply
& `Thread…
…` @ `App\DTO\PostKey` * replace `selectCurrentAndParentPostID()` to abstract `selectPostKeyDTO()` @ `App\Repository\Post\PostRepository`, also affects `App\PostsQuery\BaseQuery` & `App\PostsQuery\CursorCodec->encodeNextCursor()` * move the selecting field `$this->orderByField` on query builder from `setResult()` to `App\Repository\Post\PostRepository->selectPostKeyDTO()` * split variables `$(subR|r)eplies` by its twice assignments @ `fillWithParentPost()` @ `BaseQuery` * move the assign to `$this->orderByField` before the invoking to `App\Repository\Post\PostRepository->selectPostKeyDTO()` @ `(Index|Search)Query->query()` @ `App\PostsQuery` @ be
- Loading branch information
Showing
13 changed files
with
124 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
Check warning on line 1 in be/src/DTO/PostKey/BasePostKey.php GitHub Actions / runs-on (windows-latest) / pint
Check warning on line 1 in be/src/DTO/PostKey/BasePostKey.php GitHub Actions / runs-on (windows-latest) / pint
|
||
|
||
namespace App\DTO\PostKey; | ||
|
||
readonly abstract class BasePostKey | ||
{ | ||
public function __construct( | ||
public int $postId, | ||
public string $orderByFieldName, | ||
public mixed $orderByFieldValue, | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
Check warning on line 1 in be/src/DTO/PostKey/PostKeyWithParent.php GitHub Actions / runs-on (windows-latest) / pint
Check warning on line 1 in be/src/DTO/PostKey/PostKeyWithParent.php GitHub Actions / runs-on (windows-latest) / pint
|
||
|
||
namespace App\DTO\PostKey; | ||
|
||
readonly abstract class PostKeyWithParent extends BasePostKey | ||
{ | ||
public function __construct( | ||
public int $parentPostId, | ||
public int $postId, | ||
public string $orderByFieldName, | ||
public mixed $orderByFieldValue, | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace App\DTO\PostKey; | ||
|
||
readonly class Reply extends PostKeyWithParent | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace App\DTO\PostKey; | ||
|
||
readonly class SubReply extends PostKeyWithParent | ||
{ | ||
public function __construct( | ||
public int $tid, | ||
public int $parentPostId, | ||
public int $postId, | ||
public string $orderByFieldName, | ||
public mixed $orderByFieldValue, | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace App\DTO\PostKey; | ||
|
||
readonly class Thread extends BasePostKey | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters