Check for close parenthesis first and shorten out earlier

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

Description

Check for close parenthesis first and shorten out earlier

This patch does not change anything but only moves code around,
rearranging the order in which certain checks are executed. Instead of
three isOpen() checks, there is now a single isClosed() check early on.

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: Ia4f9d7125ef11c6e63cd88fcecc39c9a21533fc1