code: public function toCollection()
      {
          if (function_exists($this->collectionFunction)) {
              return call_user_func($this->collectionFunction, $this->toArray());
          }
  
          throw new \Exception(
              "Function {$this->collectionFunction}() was not found. " .
              "You probably need to install a suggested package?"
          );
      }
docs: Get a collection of recovery codes.
  
  @return array
  @throws \Exception