fix: Sonar issues: Avoid redeclaration of variables