Author: Iván Montes (drslump@pollinimini.net)
Author: Fabio B. Silva (fabio.bat.silva@gmail.com)
 /**
  * @param \google\protobuf\FieldDescriptorProto $field
  *
  * @return string
  */
 protected function getFieldTypeName(FieldDescriptorProto $field)
 {
     $type = $field->getType()->value();
     $name = Field::getTypeName($type);
     return $name ?: 'unknown';
 }
Esempio n. 2
0
 /**
  * @dataProvider typeNameProvider
  */
 public function testGetTypeName($type, $expected)
 {
     $this->assertEquals($expected, Field::getTypeName($type));
 }