Releases: Lambdish/phunctional
Releases · Lambdish/phunctional
Add get_each function
Add get_each function (#88) * get_each function returns an array with the values or a $default value in the case it does not exist of each item in a $coll * Fixed the error analysing code in get_each.php, parameter #1 $key of function Lambdish\Phunctional\_get_values_from_key expects string, int|string given. * get_each function documentation * get_each function will return an empty array when no item contains the expected key.
Improve documentation
Add missing parameter type (#84) Co-authored-by: Rafa Gómez <[email protected]>
A lot of improvements (and PHP 7.2 Breaking Change)
Braking Changes:
- PHP 7.2 is required as minimum
Improvements:
map
,flat_map
andfilter
accept a function that the second argument can be the key of the collection- Added function name constants
- Corrected a lot of docblocks
- Added typehint to all the possible
- Declare strict types
Add `identity` function
Add `identity` function (#80) * Changed constant function name to identity * Added the behaviour of real identity function * Fixed a typo * Changed identity function description * Changed identity function example * Changed identity function description * Changed identity function description in index * Improve identity tests
Add `flat_map` function
Add flat_map function (#78) * Added flat_map function * Fixed flat_map tests * Added flat_map function * A little fix in flat_map readme * Modifed signature of flat_map and readme description * Removed an space * Modified description of flat_map example * Added flat_map to index * fixed flat_map comment style
Add `constant` function
Add constant function (#72) * Added constant function * Changed constant function description * Fixed a typo in tests * Changed constant function name to identity * Revert "Changed constant function name to identity" This reverts commit e2bfdb2efaae85c551b7a125bd62391034ddd4bc. * Fixed wrong description on constant function documentation * Some coding style fixes * Update docs/functions/constant.md Co-Authored-By: fnandot <[email protected]> * Update docs/functions/constant.md Co-Authored-By: fnandot <[email protected]>
Little doc fixes
Merge pull request #68 from odelrio/added-missing-word-to-readme Added missing word to README
Fix phpdoc for partition function
Merge pull request #66 from fnandot/fix_phpdoc Fixed phpdoc for partition function
Fix return type
Merge pull request #65 from joanmasoletgo/patch-1 Incorrect return type
Improve key function
Merge pull request #64 from JordiCabezudo/master [key] fix possible errors with some key values