for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @param $name
* @return mixed
*/
function safename($name)
{
return preg_replace('/[^\w\d,._\-]/', '_', $name);
}
* @param $string
function shorten_interface_type($string)
Learn more about camelCase.
return str_ireplace(
array(
'FastEthernet',
'TenGigabitEthernet',
'GigabitEthernet',
'Port-Channel',
'Ethernet',
),
'Fa',
'Te',
'Gi',
'Po',
'Eth',
$string
);
}//end shorten_interface_type()
Learn more about camelCase.