Skip to content

Releases: Lambdish/phunctional

Add get_each function

18 Sep 07:22
ed3482e
Compare
Choose a tag to compare
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

30 Jun 17:00
2e41ff9
Compare
Choose a tag to compare
Add missing parameter type (#84)

Co-authored-by: Rafa Gómez <[email protected]>

A lot of improvements (and PHP 7.2 Breaking Change)

08 Dec 23:49
Compare
Choose a tag to compare

Braking Changes:

  • PHP 7.2 is required as minimum

Improvements:

  • map, flat_map and filter 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

09 Oct 10:56
b5a50d2
Compare
Choose a tag to compare
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

04 Jul 07:29
Compare
Choose a tag to compare
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

11 Apr 16:32
Compare
Choose a tag to compare
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

21 Oct 08:25
46fe90f
Compare
Choose a tag to compare
Merge pull request #68 from odelrio/added-missing-word-to-readme

Added missing word to README

Fix phpdoc for partition function

23 Sep 09:17
3c0d115
Compare
Choose a tag to compare
Merge pull request #66 from fnandot/fix_phpdoc

Fixed phpdoc for partition function

Fix return type

10 May 16:20
09cb75c
Compare
Choose a tag to compare
Merge pull request #65 from joanmasoletgo/patch-1

Incorrect return type

Improve key function

09 Feb 20:10
07b84d7
Compare
Choose a tag to compare
Merge pull request #64 from JordiCabezudo/master

[key] fix possible errors with some key values