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

Demonstrate StringHelper::booleanValue in the custom MyEchoTask code. #747

Merged
merged 3 commits into from Aug 24, 2017
Merged

Demonstrate StringHelper::booleanValue in the custom MyEchoTask code. #747

merged 3 commits into from Aug 24, 2017

Conversation

kenguest
Copy link
Member

...rather than having people code their own "yes|y|no|n|true|t|1|0" to boolean conversion code...

Copy link
Member

@siad007 siad007 left a comment

Choose a reason for hiding this comment

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

😎👍

@@ -376,6 +380,10 @@ class MyEchoTask extends Task {
$this->message = $str;
}

public function setReverse($str) {
$this->reverse = StringHelper::booleanValue($str);
Copy link
Member

Choose a reason for hiding this comment

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

It is not necessary to use StringHelper::booleanValue() here as it happens in the
IntrospectionHelper as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd be inclined to agree but 'y' or 'n' values support...

@mrook mrook merged commit a0b146e into phingofficial:master Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants