/** * Get random target * * @return mixed */ public function get() { $allTargets = $this->mapRepository->getAllTargets(); return $allTargets[rand(0, count($allTargets) - 1)]; }