removeWhere() public method

Removes all the values matched by the predicate.
public removeWhere ( callable $predicate ) : void
$predicate callable
return void
Exemplo n.º 1
0
 /**
  * @dataProvider everything
  */
 public function testThatRemoveWhereFalseRemovesNoItems(\Pinq\ICollection $collection, array $data)
 {
     $collection->removeWhere(function () {
         return false;
     });
     $this->assertMatchesValues($collection, $data);
 }
Exemplo n.º 2
0
 public function visitRemoveWhere(Operations\RemoveWhere $operation)
 {
     $this->collection->removeWhere($this->parameters[$operation->getPredicateFunction()->getCallableId()]);
 }