-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add methods to Resizer #13
base: develop
Are you sure you want to change the base?
Add methods to Resizer #13
Conversation
*/ | ||
public function getRelativePath() | ||
{ | ||
return $this->getRelativePathResizedImage(); |
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.
Just make the original method public. IMHO it does not make much sense to wrap it inside another method, just to make it public
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.
Sure, I just thought this was a better public method name for it. This way the internal one could get deprecated in time.
*/ | ||
public function getAbsolutePath() | ||
{ | ||
return $this->getAbsolutePathResized(); |
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 as before. Just make the original method public
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.
Sure, I just thought this was a better public method name for it. This way the internal one could get deprecated in time.
*/ | ||
public function resizeAndGetUrl(string $imageUrl, $width, $height, array $resizeSettings = []) | ||
public function resize(string $imageUrl, $width, $height, array $resizeSettings = []) |
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.
I need to refactor this method. I should get rid of all these init
methods that create temporal coupling, which should be avoided. I would try to improve that after merging your PR.
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'd be nice if it would return value objects or something, right?
This fixes #12.
I haven't tested the functionality of the methods yet, but this is my proposal. What do you think?