Class functions should named to clearly indicate their function, preferably including a verb.
Try to avoid overly long and verbose names and separate multiple words with underscores.
INCORRECT
CORRECT
INCORRECT
// Not descriptive and needs underscore separator
// Better, still missing underscore separator
// Way to much words
CORRECT
// Descriptive with clear underscore separators
Try to avoid overly long and verbose names and separate multiple words with underscores.
INCORRECT
Code
class megaclass
class Mega_class
CORRECT
Code
class MegaClass {
public function __construct() {
}
}
INCORRECT
// Not descriptive and needs underscore separator
Code
function fileproperties() {
}
// Better, still missing underscore separator
Code
function getfileproperties() {
}
// Way to much words
Code
function get_the_file_properties_from_the_file() {
}
CORRECT
// Descriptive with clear underscore separators
Code
function get_file_properties() {
}