Skip empty () and [], not processing closing token a second time

Authored by thiemowmde on Mar 13 2018, 11:53 AM.

Description

Skip empty () and [], not processing closing token a second time

This should speed this sniff up, without changing anything. When an empty
() or [] is detected, the closing parentesis is skipped and not processed
a second time. Because of this, the processCloseParenthesis does not need
to check if the previous token is an open parentesis (this can't happen
any more).

I did a profile run and it turns out the SpaceyParenthesis sniff is the
slowest in this code base right now. That's why I'm here trying to
speed it up.

Change-Id: I60cae68cc448520a2777f7fa8caecc1d13781eab