A law enforcement officer may halt and detain a person who has committed a petty offense in the law enforcement officer's presence or to serve a previously issued petty offense complaint and summons, for the period of time necessary to issue a petty offense complaint and summons and to complete §