I may just be failing to understand this but it seems this would set addFormatPattern to false if $settings['addFormatPattern'] was true. Is that the desired effect?