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
Dedicated static function to parse out mutator name #1331
Conversation
$parts = explode('\\', $className); | ||
|
||
return (string) end($parts); | ||
} |
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.
Closest place where Mutator::getName()
is used.
Looks a bit weird to me that it's the factory responsible for giving the mutator name (by default) – even more so than an object depends on its external factory IMO |
It is. Should be easy to refactor. What do you have in mind? |
What was wrong with how it was before? I saw there was a bunch of PRs so maybe I missed the overall picture |
It was only an instance method before (still is), but sometimes you want to get a name for a mutator having only a class name for it. |
Do you have a place where this is the case? I think it would help to understand what's going on because indeed it's a bit tricky |
Sure, right about here. |
Replied there |
This PR: