Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the hydrator check #67

Open
sagikazarmark opened this issue Jan 4, 2017 · 1 comment
Open

Change the hydrator check #67

sagikazarmark opened this issue Jan 4, 2017 · 1 comment

Comments

@sagikazarmark
Copy link
Contributor

Proposed:

if ($this->hydrator) {
    return $this->hydrator->hydrate($response, 'class');
}

return $response;

This might put lots of code within the if, but seems logically more correct to me.

@Nyholm
Copy link
Member

Nyholm commented Jan 4, 2017

It is more logical correct and it looks better with this small example. But all the error handling have to go in that if statement. It may be 15 lines of code. I fear it will not be readable.

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

No branches or pull requests

2 participants