Decrease method complexity
Decrease method complexity

This makes Scrutinizer and Phil happy

kkiernan/commonmark,garethellis36/commonmark,garethellis36/commonmark,hason/commonmark,fesor/commonmark,postalservice14/commonmark,thephpleague/commonmark,colinodell/commonmark,kkiernan/commonmark,thephpleague/commonmark,bcremer/commonmark,hason/commonmark,stof/commonmark,postalservice14/commonmark,fesor/commonmark