public function genTwo(Chan $ch, $limit) { for ($i = 0; $i <= $limit; $i++) { $ch->add($i); } $ch->add(null); }
private function aggregateWords(Chan $words, $numWords) { $wordsArr = []; for ($i = 0; $i < $numWords; $i++) { $wordsArr = array_merge($wordsArr, $words->get()); } return $wordsArr; }
/** * @expectedException \Exception */ public function testChanWrongType2() { // given $entity = "foo"; $ch = new Chan(Foo::getClass(), $this->driver, $this->mapper); // when $ch->add($entity); }
public function collectIfPrime(Chan $ch, Chan $ex, $n) { for ($i = 2; $i < $n; $i++) { if ($n % $i == 0) { $ex->add(true); return; } } $ch->add($n); $ex->add(true); }