exists()) { return $code; } } throw new RuntimeException('Unable to generate unique code'); } }