/**
* @param \Protobuf\Compiler\Entity $entity
*
* @return string
*/
protected function generateMethod(Entity $entity)
{
$lines = $this->generateBody($entity);
$body = implode(PHP_EOL, $lines);
$method = MethodGenerator::fromArray(['name' => 'fromArray', 'body' => $body, 'static' => true, 'parameters' => [['name' => 'values', 'type' => 'array']], 'docblock' => ['shortDescription' => "{@inheritdoc}"]]);
return $method;
}