-
Notifications
You must be signed in to change notification settings - Fork 95
Fixed namespaces, cleaned code/comments #43
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
Fixed namespaces, cleaned code/comments #43
Conversation
removed @desc tag, since it doesn't exist in phpdoc fixed comments fixed namespaces added strong-typing for some methods
…e 'setHttpAdapter' method
|
Thanks for the PR, @djagya—we'll take a look and get back to you with any comments/questions. |
|
|
||
| private static $utils; | ||
| private $adapterMock; | ||
| /** @var SparkPost */ |
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.
What does this commented line do?
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 was just to specify that $resource has SparkPost object inside to remove some warnings in code (otherwise IDE doesn't know which type has $this->resource)
|
So looking over this, I think we're going to implement http://cs.sensiolabs.org/ with PSR-2 style throughout the lib (unless we discover any reasons we can't) -- how hard would it be for you to back out the "style-only" changes so it's easier to see what this PR is doing, and then we'll run the style fixer on everything and release it... ? If it's a huge pain, we can just leave it in... it doesn't hurt anything except some clarity around what this PR is changing. Thanks again! |
|
Sure, it's not a problem, I'll revert my changes styles changes back. |
|
Done |
Fixed namespaces, cleaned code/comments - closes #42
|
@jasonrhodes sure, no problem! |
Also one test is removed, because my opinion is that strong-typing is better than condition with 'instanceof', especially in cases when it is a simple check for only one class.
And for strong-typing we don't need tests, because it's like test for builtin php functionality, what is already tested.
Also I removed @desc tag, because phpDoc doesn't have that tag implemented and it does nothing.
Also I make code following PSR-2 standard, but if you don't like that, I can return all those braces, that are now on the next line.