Skip to content

Conversation

gueroverde
Copy link

this is the first practice with hexagonal architect please if you have any comment don´t hesitate in making me know it

public function __invoke(Request $request): JsonResponse
{
return new JsonResponse(
$this->queryBus->__invoke()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just interesting. Why not $this->queryBus() ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both of them it's right since in my current job using the __invoke to be more explicit that is the reason that I used here, but i think it's ok use as function, maybe i don't have any particular reason, only by the definition on my teamwork. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants