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

Refactoring default request and response #67

Merged
merged 2 commits into from
Sep 29, 2015

Conversation

gianarb
Copy link
Contributor

@gianarb gianarb commented Sep 28, 2015

No description provided.

($request != null) ?: $request = $this->request;
($response != null) ?: $response = $this->response;
($request != null) ?: $request = ServerRequestFactory::fromGlobals();
($response != null) ?: $response = new Response();
Copy link
Member

Choose a reason for hiding this comment

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

I think it can be more readable with:

$request = ($request !== null) ?: ServerRequestFactory::fromGlobals();
$response = ($response !== null) ?: new Response();

also, !== instead of !=

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your feedback doesn't run.. I merge this PR at the moment

Copy link
Member

Choose a reason for hiding this comment

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

Ok, hopefully can recheck about that

@gianarb gianarb force-pushed the feature/default-request-response branch from 78c6c5d to 960c2e6 Compare September 29, 2015 17:38
gianarb pushed a commit that referenced this pull request Sep 29, 2015
Refactoring default request and response
@gianarb gianarb merged commit 14b95a8 into master Sep 29, 2015
@gianarb gianarb added this to the 0.4.0 milestone Sep 29, 2015
@gianarb gianarb deleted the feature/default-request-response branch October 5, 2015 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants