-
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.
* merge trait
PostWithIsMatchQuery
into Post
+ interface `SortablePost` as a contract of g/setter of props `isMatchQuery` & `sortingKey` in trait `Post` and let all classes that using this trait also implement it + prop `replies` and its g/setter @ `Thread` + prop `subReplies` and its g/setter @ `Reply` @ `App\DTO\Post` * migrate from the `Collection` of normalized DTO array to DTO and `SortablePost` itself - param `$shouldRemoveSortingKey` and var `$removeSortingKey` as `SortablePost->getSortingKey()` marked as `#[Symfony\Component\Serializer\Attribute\Ignore]` @ `reOrderNestedPosts()` * now will set children posts as the value of nested posts prop without normalizing DTO to array @ `nestPostsWithParent()` @ `App\PostsQuery\PostsTree` @ be
- Loading branch information
Showing
7 changed files
with
114 additions
and
83 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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\DTO\Post; | ||
|
||
use Symfony\Component\Serializer\Attribute\Ignore; | ||
|
||
interface SortablePost | ||
{ | ||
public function getIsMatchQuery(): bool; | ||
|
||
public function setIsMatchQuery(bool $isMatchQuery): void; | ||
|
||
#[Ignore] public function getSortingKey(): mixed; | ||
|
||
public function setSortingKey(mixed $sortingKey): void; | ||
} |
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