Skip to content

Commit

Permalink
Update README and documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jun 29, 2020
1 parent 93e7be8 commit e68c325
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/loophp/collection/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/loophp/collection/?branch=master)
[![License](https://img.shields.io/packagist/l/loophp/collection.svg?style=flat-square)](https://packagist.org/packages/loophp/collection)
[![Donate!](https://img.shields.io/badge/Sponsor-Github-brightgreen.svg?style=flat-square)](https://github.com/sponsors/drupol)
[![Donate!](https://img.shields.io/badge/Sponsor-Paypal-brightgreen.svg?style=flat-square)](https://www.paypal.me/drupol)

# PHP Collection

Expand Down Expand Up @@ -57,7 +58,14 @@ Similar libraries:
On top of a complete documented code, the package include a full documentation that gets automatically compiled
and published upon each commit at [https://loophp-collection.rtfd.io](https://loophp-collection.rtfd.io).

The documentation is missing some parts, it's being continuously improved with time.
[The API](https://loophp-collection.readthedocs.io/en/latest/pages/api.html) will give you a pretty good idea of the
existing methods and what you can do with it.

Do not forget to check out the [usage](https://loophp-collection.readthedocs.io/en/latest/pages/usage.html) and
[examples](https://loophp-collection.readthedocs.io/en/latest/pages/examples.html) pages.

I'm doing my best to keep the documentation up to date, if you found something odd, please let me know in the [issue
queue](https://github.com/loophp/collection/issues).

## Code quality, tests and benchmarks

Expand All @@ -67,14 +75,23 @@ tests.
The library has tests written with [PHPSpec](http://www.phpspec.net/).
Feel free to check them out in the `spec` directory. Run `composer phpspec` to trigger the tests.

Before each commit some inspections are executed with [GrumPHP](https://github.com/phpro/grumphp),
Before each commit some inspections (_currently 14_) are executed with [GrumPHP](https://github.com/phpro/grumphp),
run `./vendor/bin/grumphp run` to check manually.

[PHPInfection](https://github.com/infection/infection) is used to ensure that your code is properly tested, run `composer infection` to test your code.
The quality of the tests is tested with a PHP Mutation testing framework, run `composer infection` to try it.

Static analysers are also controlling the code. [PHPStan](https://github.com/phpstan/phpstan) and
[PSalm](https://github.com/vimeo/psalm) are enabled to their maximum level.

[PHP Insights](https://packagist.org/packages/nunomaduro/phpinsights) is also launched in Github actions just for
information. (_[example of PHP Insights report](https://github.com/loophp/collection/runs/818917887?check_suite_focus=true#step:11:221), you must be logged on Github to see it_)

## Contributing

Feel free to contribute to this library by sending Github pull requests. I'm quite reactive :-)
Feel free to contribute by sending Github pull requests. I'm quite reactive :-)

If you can't contribute to the code, you can also sponsor me on [Github](https://github.com/sponsors/drupol) or
[Paypal](https://www.paypal.me/drupol).

## On the internet
* [Reddit announcement thread](https://www.reddit.com/r/PHP/comments/csxw23/a_stateless_and_modular_collection_class/)
19 changes: 15 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,28 @@ On top of this, this library:
* fully tested,
* framework agnostic.

Except a few methods, most of methods are `pure`_ and return a new Collection object.
Except a few methods, most methods are `pure`_ and return a `new Collection object`_.

This library has been inspired by the `Laravel Support Package`_, `Lazy.js`_ and `Ruby arrays`_.
This library has been inspired by:
* `Laravel Support Package`_
* `Lazy.js`_
* `Ruby Array`_
* `mtdowling/transducers`_

Similar libraries:
* `DusanKasan/Knapsack`_
* `nikic/iter`_

It uses the following `PHP Standards Recommendations`_ :

- `PSR-4`_ for classes auto loading,
- `PSR-12`_ for coding standards.

This library is framework agnostic and can be integrated in any PHP project, in any framework.

.. _nikic/iter: https://github.com/nikic/iter
.. _DusanKasan/Knapsack: https://github.com/DusanKasan/Knapsack
.. _mtdowling/transducers: https://github.com/mtdowling/transducers.php
.. _Ruby Array: https://ruby-doc.org/core-2.7.0/Array.html
.. _new Collection object: https://github.com/loophp/collection/blob/master/src/Collection.php
.. _Lazy.js: http://danieltao.com/lazy.js/
.. _Laravel Support Package: https://github.com/illuminate/support
.. _pure: https://en.wikipedia.org/wiki/Pure_function
Expand Down

0 comments on commit e68c325

Please sign in to comment.