[gantree] improve code climate score

https://bleacherreport.lighthouseapp.com/projects/6296/tickets/17620-gantree-improve-code-climate-score#ticket-17620-1