A judge said 23-year-old Sonny Stirton had a "dreadful criminal record involving criminal offending of the type associated with gangs".