code: public function getSessionCookie():?SetCookie
      {
          try {
              // envoie du cookie de session
              if ($this->isStarted()) {
                  return new SetCookie(
                      $this->getName(),
                      $this->getDataHolder()->getId(),
                      (time() + $this->getExpire() * 60),
                      $this->getCookiePath() ?? '/',
                      $this->getCookieHost() ?? '',
                      $this->getCookieSecure(),
                      $this->isCookieHttpOnly()
                  );
              }
  
              // sinon destruction du cookie de session
              else {
                  return SetCookie::thatDeletesCookie($this->getName());
              }
          }
          catch (\Throwable $exception) {
              throw new SessionManagerException(
                  "Error while preparing the session cookie",
                  $this, null, $exception
              );
          }
      }
docs: Returns the session cookie.
  
  @return SetCookie|null
  @throws SessionManagerException