private function matchIf($event, $checkResult) { if ($checkResult && $event) { $matchCount = 1; $matchingEvents = array($event); } else { $matchCount = 0; $matchingEvents = array(); } return array($matchCount, $matchingEvents); }