Answer the question
In order to leave comments, you need to log in
What is the norm for class names?
I haven't seen the https://www.php-fig.org/psr/ standards for the length of the class name.
For example, if a developer writes such a name to improve the readability of the code, is this SomeClassNameThatDoSomeCoolStuff
correct?
As planned, when you see such a class, it is immediately clear what it does, although if there is some kind of constant in it, then such a class can occupy the entire line, that is, approximately 125 characters, including indents.
Answer the question
In order to leave comments, you need to log in
There is always a reasonable limit and a synonym, so SomeClassNameThatDoSomeCoolStuff may well be CoolStuff
Moreover, class methods are also named, so it is reasonable to combine such "cool crap" into helpers. So here StuffHelper::doSomeCool() seems to be more correct, and it's not half a line anymore and it's understandable.
Just avoid extremes, for example:
we are looking for a middle ground, but it is absent without context, so it is problematic to introduce this into the standard. And why, if there is sound logic.
Attention: to hell with the Russian language from the code, $tovar
it really infuriates
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question