generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
What
Add new method to Arr class, in src/Arr.php file
Description
The toLocaleString() method returns a string representing the elements of the array. The elements are converted to Strings using their toLocaleString methods and these Strings are separated by a locale-specific String (such as a comma “,”).
In PHP as far as I know there is no toLocaleString. My suggestion is to try to convert into locale string detecting the type
- number_format() if number
- date_format if it is date
Checklist
- implement method
- write phpdoc for the function
- write test in tests/ArrTest.php
- execute composer format
- execute composer test-coverage
- check if your method has full test coverage
- add method in changelog
- update doc/arr.md adding a use case of the new method
- update cheatsheet (examples/cheatsheet.php)