Sonar correction for PSR2 code quality