public function testNop() { $nop = Functions::nop(); $ref = new \stdClass(); $this->assertSame($ref, $nop($ref)); }
/** * Removes all falsey values. * * @param Collection $collection * @return Collection */ public function __invoke($collection) { $filter = new FilterMutator(); return $filter($collection, Functions::nop()); }