Skip to content
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

Added support for multiple character separators at string humanizer #49

Merged
merged 2 commits into from
Nov 1, 2015
Merged

Added support for multiple character separators at string humanizer #49

merged 2 commits into from
Nov 1, 2015

Conversation

drgomesp
Copy link
Contributor

Regarding #45, now you can pass a special character separator to humanize strings:

$this->humanize('news-count', true, Humanize::SEPARATOR_DASH)->shouldReturn('News count');

@@ -4,6 +4,9 @@

class Humanize
{
const SEPARATOR_DASH = '-';
const SEPARATOR_UNDERSCORE = '_';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we really need those constants.
public function __construct($text, $capitalize = true, $separator = '-')
should be enough. In next release I would like to change this behavior anyway, I would like to not pass aything by default as a separator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Just making the change and we will be good to go.

@norberttech
Copy link
Member

@drgomesp thanks a lot! Please take a look at my comment and I gonna merge it.

@drgomesp
Copy link
Contributor Author

drgomesp commented Nov 1, 2015

@norzechowicz 👍

norberttech pushed a commit that referenced this pull request Nov 1, 2015
…ator

Added support for multiple character separators at string humanizer
@norberttech norberttech merged commit 0a04e02 into coduo:master Nov 1, 2015
@norberttech
Copy link
Member

@drgomesp thanks! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants