public function testWithout() { $ary = array(1, 2, 3, "four", "five", "six"); $this->assertSame(array(0 => 1, 2 => 3, 3 => "four", 4 => "five", 5 => "six"), \r8\ary\without($ary, 2)); $this->assertSame(array(0 => 1, 3 => "four", 4 => "five", 5 => "six"), \r8\ary\without($ary, 2, "3")); $this->assertSame(array(0 => 1, 3 => "four", 5 => "six"), \r8\ary\without($ary, 2, "3", "five", array("six"))); }
/** * Removes a value to the list of valid options * * @param mixed $value The value to remove * @return \r8\Validator\In Returns a self reference */ public function remove($value) { $this->list = array_values(\r8\ary\without($this->list, $value)); return $this; }