public function flush() { switch ($this->unit_of_work->getQueueSize()) { case 0: return; case 1: $this->flushSingle(); break; default: $this->flushMulti(); break; } }