コード例 #1
0
 /**
  * @param callable(value:mixed,index:int):bool $callback
  * @return static
  */
 public function filter($callback)
 {
     $callback = $this->callbackParser->parseArrowFunction($callback);
     return parent::filter($callback);
 }
コード例 #2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testShouldThrowInvalidArgumentExceptionOnSettingNotCallableCallbackToFilter()
 {
     $this->list->filter(1);
 }