original_string: public function restoreState()
      {
          if ($activeCurrency = $this->stateService->getByKey(self::ACTIVE_CURRENCY_KEY)) {
              $this->activeCurrency = $activeCurrency;
          }
      }
code: public function restoreState()
      {
          if ($activeCurrency = $this->stateService->getByKey(self::ACTIVE_CURRENCY_KEY)) {
              $this->activeCurrency = $activeCurrency;
          }
      }
code_tokens: public function restoreState ( ) { if ( $ activeCurrency = $ this -> stateService -> getByKey ( self :: ACTIVE_CURRENCY_KEY ) ) { $ this -> activeCurrency = $ activeCurrency ; } }
docstring: Uses the State service to retrieve the active currency's identifier and sets the active currency.
  
  If the retrieved identifier is not an instance of the Identifier Interface, then it checks if it is a string,
  which it uses to create a new Identifier object to set the active currency.
  @return void
docstring_tokens: Uses the State service to retrieve the active currency s identifier and sets the active currency .