public static function Project::compareLength in Coder 8.2
Same name and namespace in other branches
- 8.3 coder_sniffer/DrupalPractice/Project.php \DrupalPractice\Project::compareLength()
- 8.3.x coder_sniffer/DrupalPractice/Project.php \DrupalPractice\Project::compareLength()
Helper method to sort array values by string length with usort().
Parameters
string $a First string.:
string $b Second string.:
Return value
int
File
- coder_sniffer/
DrupalPractice/ Project.php, line 225
Class
- Project
- Helper class to retrieve project information like module/theme name for a file.
Namespace
DrupalPracticeCode
public static function compareLength($a, $b) {
return strlen($a) - strlen($b);
}