/** * Determines if a model is eligible for commit. * * @todo Does delete need to be here? * @param Model $model * @return bool */ protected function shouldCommit(Model $model) { $state = $model->getState(); return true === $state->is('dirty') || $state->is('new') || $state->is('deleting'); }