Optimize remplaceAttributsVar method and fix scrutinizer issue on getVars method.