referenceMatcher = $referenceMatcher; } /** * @param MigrationStep $step * @return void * @throws MigrationStepSkippedException */ protected function skipStepIfNeeded(MigrationStep $step) { if (isset($step->dsl['if'])) { if (!$this->matchConditions($step->dsl['if'])) { throw new MigrationStepSkippedException(); } } } protected function matchConditions($conditions) { $match = $this->referenceMatcher->match($conditions); return reset($match); } }