public static function sortingCallBack(array $first, array $second)
{
if ($first['importType'] !== $second['importType']) {
return $first['importType'] > $second['importType'] ? 1 : -1;
}
$firstNamespace = trim(preg_replace('%/\\*(.*)\\*/%s', '', $first['namespace']));
$secondNamespace = trim(preg_replace('%/\\*(.*)\\*/%s', '', $second['namespace']));
// Replace backslashes by spaces before sorting for correct sort order
return strcasecmp(str_replace('\\', ' ', $firstNamespace), str_replace('\\', ' ', $secondNamespace));
}