original_string: protected function getLocale(?string $expectedLocale)
      {
          return $expectedLocale ?? (null === $this->request ? $this->defaultLocale : $this->request->getLocale());
      }
code: protected function getLocale(?string $expectedLocale)
      {
          return $expectedLocale ?? (null === $this->request ? $this->defaultLocale : $this->request->getLocale());
      }
code_tokens: protected function getLocale ( ? string $ expectedLocale ) { return $ expectedLocale ?? ( null === $ this -> request ? $ this -> defaultLocale : $ this -> request -> getLocale ( ) ) ; }
docstring: Always get a locale even if we are not in a request.
docstring_tokens: Always get a locale even if we are not in a request .