private function predicate(GeneratedValue $value) { if ($this->filter instanceof PHPUnit_Framework_Constraint) { try { $this->filter->evaluate($value->unbox()); return true; } catch (PHPUnit_Framework_ExpectationFailedException $e) { return false; } } if (is_callable($this->filter)) { return call_user_func($this->filter, $value->unbox()); } throw new LogicException("Specified filter does not seem to be of the correct type. Please pass a callable or a PHPUnit_Framework_Constraint instead of " . var_export($this->filter, true)); }
public function contains(GeneratedValue $element) { return is_float($element->unbox()); }
public function contains(GeneratedValue $value) { return is_string($value->unbox()) && (bool) preg_match("/{$this->expression}/", $value->unbox()); }
public function contains(GeneratedValue $value) { return in_array($value->unbox(), $this->list); }
public function contains(GeneratedValue $generatedValue) { $value = $generatedValue->unbox(); return is_string($value) && strlen($value) == 1 && ord($value) >= $this->lowerLimit && ord($value) <= $this->upperLimit; }
public function contains(GeneratedValue $element) { return in_array($element->unbox(), $this->domain); }
public function contains(GeneratedValue $element) { $value = $element->unbox(); return $value instanceof DateTime && $value >= $this->lowerLimit && $value <= $this->upperLimit; }