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