/** * @dataProvider arraysOfString */ public function testThatCollectionApplyWorks(\Pinq\ICollection $collection, array $data) { $collection->apply(function (&$i) { sort($i); }); $this->assertMatches($collection, [['b', 'd', 'l', 'q'], ['a', 'a', 'c', 'd'], ['d', 'd', 'f', 'q'], ['a', 'm', 't', 'v']]); }
public function visitApply(Operations\Apply $operation) { $this->collection->apply($this->parameters[$operation->getMutatorFunction()->getCallableId()]); }