unbox() public method

public unbox ( ) : T
return T
Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 public function contains(GeneratedValue $element)
 {
     return is_float($element->unbox());
 }
Ejemplo n.º 3
0
 public function contains(GeneratedValue $value)
 {
     return is_string($value->unbox()) && (bool) preg_match("/{$this->expression}/", $value->unbox());
 }
Ejemplo n.º 4
0
 public function contains(GeneratedValue $value)
 {
     return in_array($value->unbox(), $this->list);
 }
Ejemplo n.º 5
0
 public function contains(GeneratedValue $generatedValue)
 {
     $value = $generatedValue->unbox();
     return is_string($value) && strlen($value) == 1 && ord($value) >= $this->lowerLimit && ord($value) <= $this->upperLimit;
 }
Ejemplo n.º 6
0
 public function contains(GeneratedValue $element)
 {
     return in_array($element->unbox(), $this->domain);
 }
Ejemplo n.º 7
0
 public function contains(GeneratedValue $element)
 {
     $value = $element->unbox();
     return $value instanceof DateTime && $value >= $this->lowerLimit && $value <= $this->upperLimit;
 }