-
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
14 changed files
with
124 additions
and
54 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 | ||
|
||
namespace App\DTO\PostKey; | ||
|
||
abstract readonly 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 | ||
|
||
namespace App\DTO\PostKey; | ||
|
||
abstract readonly 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,6 @@ | ||
<?php | ||
|
||
namespace App\DTO\PostKey; | ||
|
||
// phpcs:disable PSR2.Classes.ClassDeclaration.OpenBraceNewLine | ||
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,6 @@ | ||
<?php | ||
|
||
namespace App\DTO\PostKey; | ||
|
||
// phpcs:disable PSR2.Classes.ClassDeclaration.OpenBraceNewLine | ||
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
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