1
0
Fork 0
mirror of synced 2024-09-28 15:31:43 +12:00

Updated docs

This commit is contained in:
eldadfux 2019-08-19 23:55:41 +03:00
parent 467121a70f
commit 0cb118b2a5

View file

@ -474,12 +474,7 @@ $utopia->get('/v1/open-api-2.json')
}
function fromCamelCaseToDash($input) {
preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);
$ret = $matches[0];
foreach ($ret as &$match) {
$match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);
}
return implode('-', $ret);
return str_replace([' ', '_'], '-', strtolower(preg_replace('/([a-zA-Z])(?=[A-Z])/', '$1-', $input)));
}
/*$scopes = [