Ejemplo n.º 1
0
 /**
  * If the property is a instance of Field then we can get the field type of it, otherwise return text
  * @param Property $property
  *
  * @return string
  */
 public static function getFieldType(Property $property)
 {
     $variableName = $property->getVariableName();
     if (static::$object->getFieldType($variableName) instanceof Field) {
         return static::$object->getFieldType($variableName)->getFieldType();
     }
     return 'text';
 }
Ejemplo n.º 2
0
 /**
  * @covers ::create
  * @uses \phpDocumentor\Reflection\TypeResolver
  * @expectedException \InvalidArgumentException
  */
 public function testFactoryMethodFailsIfDescriptionFactoryIsNull()
 {
     Property::create('body', new TypeResolver());
 }