private function typeOfElement($element)
{
if (!$element) {
throw new \RuntimeException("Missing tag revision on repository. Check your xml profile (Section: repositories).");
}
foreach ($element->attributes() as $key => $value) {
if ('type' === $key) {
$type = (string) $value;
}
}
if (is_null($type) || !in_array($type, array('branch', 'tag'))) {
throw new \RuntimeException("The type on revision tag is not correct.");
}
return $type;
}