-
-
Notifications
You must be signed in to change notification settings - Fork 167
Small code improvements #286
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
Small code improvements #286
Conversation
clue
left a comment
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.
Good catch and thank you for filing this PR! 👍 Can you update the comments below and maybe squash this to a reasonable number of commits?
src/Io/ServerRequest.php
Outdated
| use Psr\Http\Message\StreamInterface; | ||
| use Psr\Http\Message\UriInterface; | ||
| use RingCentral\Psr7\Request; | ||
| use InvalidArgumentException; |
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.
It looks like these imports aren't used anywhere?
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.
Actually, constructor has @throws annotation. My IDE (PHPStorm) highlights it with undefined class InvalidArgumentException. I've removed import and added root namespace to annotation.
| * */ | ||
| class CloseProtectionStream extends EventEmitter implements ReadableStreamInterface | ||
| { | ||
| private $connection; |
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.
Good catch! Apparently, this should be replaced with $input which is used in the constructor 👍
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.
done
e03f56a to
742a015
Compare
742a015 to
ceba730
Compare
|
@clue I've updated the request according to your comments |
clue
left a comment
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 for the quick update! 👍
This PR provides some small code improvement: