original_string: public function getSession()
      {
          $session = $this->session;
          if (!$session instanceof SessionInterface && null !== $session) {
              $this->setSession($session = $session());
          }
  
          if (null === $session) {
              @trigger_error(sprintf('Calling "%s()" when no session has been set is deprecated since Symfony 4.1 and will throw an exception in 5.0. Use "hasSession()" instead.', __METHOD__), E_USER_DEPRECATED);
              // throw new \BadMethodCallException('Session has not been set');
          }
  
          return $session;
      }
code: public function getSession()
      {
          $session = $this->session;
          if (!$session instanceof SessionInterface && null !== $session) {
              $this->setSession($session = $session());
          }
  
          if (null === $session) {
              @trigger_error(sprintf('Calling "%s()" when no session has been set is deprecated since Symfony 4.1 and will throw an exception in 5.0. Use "hasSession()" instead.', __METHOD__), E_USER_DEPRECATED);
              // throw new \BadMethodCallException('Session has not been set');
          }
  
          return $session;
      }
code_tokens: public function getSession ( ) { $ session = $ this -> session ; if ( ! $ session instanceof SessionInterface && null !== $ session ) { $ this -> setSession ( $ session = $ session ( ) ) ; } if ( null === $ session ) { @ trigger_error ( sprintf ( 'Calling "%s()" when no session has been set is deprecated since Symfony 4.1 and will throw an exception in 5.0. Use "hasSession()" instead.' , __METHOD__ ) , E_USER_DEPRECATED ) ; // throw new \BadMethodCallException('Session has not been set'); } return $ session ; }
docstring: Gets the Session.
  
  @return SessionInterface|null The session
docstring_tokens: Gets the Session .