Fix code smell ForLoopWithTestFunctionCall
Fix code smell ForLoopWithTestFunctionCall

Avoid function calls in a FOR loop test part
(Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed)

Replace trivial getter methods with the attribute that they return
(e.g. `$this->getWidth()` can be `$this->width`). Also move calls
to non-trivial functions out of the for loop.

smrealms/smr,hemberger/smr,hemberger/smr,smrealms/smr,smrealms/smr,hemberger/smr,hemberger/smr