Readability is the key. Version 1.0.1
.
composer require php-packages/fluent
class A
{
use \PhpPackages\Fluent\FluentTrait;
}
$a = new A;
$a->should->do->something("useful");
$a->getFluent()->getCalls(); # => ["should", "do", ["something", ["useful"]]]
$a->getFluent()->clearCalls();
$a->_jump_and_scream();
$a->postCatsInInstagram();
$a->getFluent()->getCalls(); # => ["jump", "and", "scream", "post", "cats", "in", "instagram"]
$a->getFluent()->clearCalls();
$a->doThat()->and->doThis(123, null);
$a->getFluent()->getCalls(); # => ["do", "that", "and", "do", ["this", [123, null]]]
Fluent is licensed under the MIT License (MIT).