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

Implement getString() in FormattableTrait #29

Closed
roberto-butti opened this issue Oct 12, 2024 · 1 comment
Closed

Implement getString() in FormattableTrait #29

roberto-butti opened this issue Oct 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@roberto-butti
Copy link
Contributor

IN some case you need the get() method to return and force a string.
Add getString() method that essentially force the returing type as string.
An example of use case:

-                str_pad($space->get("id"), 8, ".");
+                str_pad((string) $space->get("id"), 8, ".");

should be

str_pad($space->getString("id"), 8, ".");
@roberto-butti roberto-butti added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Oct 12, 2024
@roberto-butti roberto-butti self-assigned this Oct 12, 2024
@roberto-butti
Copy link
Contributor Author

closed by #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant