GithubHelp home page GithubHelp logo

psliwa / fluent-traversable Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 1.0 372 KB

Support for operating on collections and arrays by functional way. Inspired by guava's FluentIterable, java8 Stream framework and scala stuff.

License: MIT License

PHP 100.00%

fluent-traversable's People

Contributors

psliwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

thecodinghood

fluent-traversable's Issues

strict FluentComposer factories

The name of FluentComposer::forArray is misleading because it does not only accept arrays but also Traversable. I would expect a type hint array for the parameter.

FluentComposer::forValue should assert that a value has been passed instead of hiding the wrong call by using no values [] (source).

Further, a non-strict version FluentComposer::forIterable or FluentComposer::forTraversable might be added.

the iterable pseudo-type [...] is an array or an object implementing Traversable
see http://php.net/manual/en/function.is-iterable.php

is_iterable (introduced in PHP 7) is similar to FluentTraversable::isTraversable. Since the term Traversable is used for different types (built-in Traversable vs. FluentTraversable) FluentComposer::forIterable might be more accurate than FluentComposer::forTraversable.
Actually, FluentTraversable::from accepts also FluentTraversable which is not an Iterable but that could be fixed by implementing IteratorAggregate or Iterator.

Bump into php-7.x versions

As title, this package still supports the old php-5.x versions.

It's time to bump into php-7.x versions because the php-7.0 version has been released for about three years.

@psliwa, what do you think about this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.