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

Add static class helper for converting values #8

Open
pionl opened this issue Jun 29, 2022 · 0 comments
Open

Add static class helper for converting values #8

pionl opened this issue Jun 29, 2022 · 0 comments

Comments

@pionl
Copy link
Contributor

pionl commented Jun 29, 2022

Sometimes we have value from different data source (like laravel form request) and we want to ensure that the type is correct.

For this we need only nullable values.

``php
Value::toInt($value);
Value::toString($value);
Value::toRequiredString($value);
Value::toBool($value);
Value::toArray($value);
Value::toFloat($value);


We want to reuse the basic `GetValue` logic for it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant