Added $matchArray to matchesWith method so not to modify a expensive array operation on several method calls