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
Extracted functions to static methods #345
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I like this.
I just had some minors. After that Im 👍
* | ||
* @return array | ||
*/ | ||
public static function parseMessage($message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be internal as _parse_message
.
* | ||
* @return array | ||
*/ | ||
public static function caselessRemove($keys, array $data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be marked as internal too.
* | ||
* @return string | ||
*/ | ||
public static function parseRequestUri($path, array $headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, mark it as internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
🚀 |
* Extracted functions to static methods * Fixed typo in README
This PR pairs with guzzle/guzzle#2712. After this is merged, we can tag 1.7.0.
TODO:
Mappings:
str
Message::toString
uri_for
Utils::uriFor
stream_for
Utils::streamFor
parse_header
Header::parse
normalize_header
Header::normalize
modify_request
Utils::modifyRequest
rewind_body
Message::rewindBody
try_fopen
Utils::tryFopen
copy_to_string
Utils::copyToString
copy_to_stream
Utils::copyToStream
hash
Utils::hash
readline
Utils::readLine
parse_request
Message::parseRequest
parse_response
Message::parseResponse
parse_query
Query::parse
build_query
Query::build
mimetype_from_filename
MimeType::fromFilename
mimetype_from_extension
MimeType::fromExtension
_parse_message
Message::parseMessage
_parse_request_uri
Message::parseRequestUri
get_message_body_summary
Message::bodySummary
_caseless_remove
Utils::caselessRemove
NB The overall idea of these changes was approved by the original author, Michael: guzzle/promises#108.