Example #1
0
 /**
  * {@inheritdoc}
  */
 public function ratify($value, PropertyDefinitionInterface $definition = null)
 {
     $value = parent::ratify($value, $definition);
     if (is_null($value)) {
         return $value;
     }
     $type = $definition->getType();
     $name = $definition->getName();
     $this->validateType($value, $type, $name);
     if ($definition->isGeneric()) {
         $type = $definition->getGenericType();
         $this->validateGenericType($value, $type, $name);
     }
     return $value;
 }
Example #2
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testRatifyException()
 {
     $this->obj->ratify('someValue', null);
 }