Skip to content

Commit

Permalink
docs: Update documentation.
Browse files Browse the repository at this point in the history
Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
  • Loading branch information
drupol committed Oct 10, 2020
1 parent bdedb51 commit 94773e6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.7.1](https://github.com/loophp/collection/compare/2.7.0...2.7.1)
## [2.7.2](https://github.com/loophp/collection/compare/2.7.1...2.7.2)

### Commits

- refactor: Add missing annotations. [`bdedb51`](https://github.com/loophp/collection/commit/bdedb51f91547117ff1069dffdc2686bba18b5f0)
- refactor: Add return statement. [`1a57ffb`](https://github.com/loophp/collection/commit/1a57ffb6a9589a7da0811ae7d24955252c7635df)
- test: Add missing tests. [`a2217a8`](https://github.com/loophp/collection/commit/a2217a8dba01e72354bec7738a98e76dcc22d7d6)
- refactor: Align TakeWhile and Until operations. [`b680be9`](https://github.com/loophp/collection/commit/b680be963a113a554efe293c771cc74b52912065)
- refactor: Leverage tacit programming. [`aa4df6e`](https://github.com/loophp/collection/commit/aa4df6e545216d72e5cf8ae3c8739bdc12000da3)

## [2.7.1](https://github.com/loophp/collection/compare/2.7.0...2.7.1) - 2020-10-08

### Merged

Expand All @@ -14,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Commits

- docs: Update changelog. [`7ea007d`](https://github.com/loophp/collection/commit/7ea007d7b74b6d5e936bcc1a2b12ed8cd75a37c0)
- fix: Fix Has operation. [`8af7817`](https://github.com/loophp/collection/commit/8af7817cef291570f83169a4753861d150f17ae2)
- refactor: Leverage tacit programming. [`69541f6`](https://github.com/loophp/collection/commit/69541f6179d48cf2c5da5d201a3cd600b86d8dde)

Expand Down
36 changes: 36 additions & 0 deletions docs/pages/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,14 @@ Operations always returns a new collection object.
all
~~~

Convert the collection into an array.

This is a lossy operation because PHP array keys cannot be duplicated and must either be int or string.

Interface: `Allable`_

Signature: ``Collection::all();``

append
~~~~~~

Expand Down Expand Up @@ -402,8 +408,12 @@ Signature: ``Collection::compact(...$values);``
contains
~~~~~~~~

Check if the collection contains one or more value.

Interface: `Containsable`_

Signature: ``Collection::contains(...$value);``

current
~~~~~~~

Expand Down Expand Up @@ -573,8 +583,12 @@ Signature: ``Collection::explode(...$items);``
falsy
~~~~~

Check if the collection contains falsy values.

Interface: `Falsyable`_

Signature: ``Collection::falsy();``

filter
~~~~~~

Expand Down Expand Up @@ -739,8 +753,12 @@ Signature: ``Collection::frequency();``
get
~~~

Get a specific element of the collection from a key, if the key doesn't exists, returns the default value.

Interface: `Getable`_

Signature: ``Collection::get($key, $default = null);``

group
~~~~~

Expand Down Expand Up @@ -788,8 +806,12 @@ Signature: ``Collection::groupBy(?callable $callback = null);``
has
~~~

Check if the collection has a value. The value must be provided as a callback.

Interface: `Hasable`_

Signature: ``Collection::has(callable $callback);``

head
~~~~

Expand Down Expand Up @@ -845,8 +867,14 @@ Signature: ``Collection::ifThenElse(callable $condition, callable $then, ?callab
implode
~~~~~~~

Convert all the elements of the collection to a single string.

The glue character can be provided, default is the empty character.

Interface: `Implodeable`_

Signature: ``Collection::implode(string $glue = '');``

init
~~~~

Expand Down Expand Up @@ -1073,8 +1101,12 @@ Signature: ``Collection::nth(int $step, int $offset = 0);``
nullsy
~~~~~~

Check if the collection contains nullsy values.

Interface: `Nullsyable`_

Signature: ``Collection::nullsy();``

only
~~~~

Expand Down Expand Up @@ -1684,8 +1716,12 @@ Signature: ``Collection::transpose();``
truthy
~~~~~~

Check if the collection contains truthy values.

Interface: `Truthyable`_

Signature: ``Collection::truthy();``

unlines
~~~~~~~

Expand Down

0 comments on commit 94773e6

Please sign in to comment.