Added a check for a method variables declaration ending with a comma