[TYPO3-core] Suggestion about use statement

Bernhard Kraft kraftb at kraftb.at
Wed Feb 12 10:20:43 CET 2014


On 2014-02-07 00:49, Philipp Gampe wrote:

> Most classes only use very few other classes. IMHO, a large number of use
> statements shows a design flaw in the following code. The class is concerned
> with too much.


I also prefer to have more use statements. I think having a use 
statement for classes with more than 10 occurences (except doc comments) 
is a virtual "must have".

But in my (punkish) opinion there should be no rule which forces the 
developer to add a use statement just for a single occurence. So I would 
leave it somehow in the decision of the developer - maybe he/she has a 
reason for (not) adding a use statement here and there.

Ad PHPStorm: Maybe some of you know I work with vim. It's ancient, it's 
powerful, it's cool - and it didn't change (much) or appear/disappear 
during the last few decades. Soemthing one can rely on. And if one 
doesn't know the API a good IDE wont do the work instead.


More information about the TYPO3-team-core mailing list