original_string: public function setSaveStrategy($strategy)
      {
          if (!in_array($strategy, [self::SAVE_APPEND, self::SAVE_REPLACE])) {
              $msg = sprintf('Invalid save strategy "%s"', $strategy);
              throw new InvalidArgumentException($msg);
          }
  
          $this->_saveStrategy = $strategy;
  
          return $this;
      }
code: public function setSaveStrategy($strategy)
      {
          if (!in_array($strategy, [self::SAVE_APPEND, self::SAVE_REPLACE])) {
              $msg = sprintf('Invalid save strategy "%s"', $strategy);
              throw new InvalidArgumentException($msg);
          }
  
          $this->_saveStrategy = $strategy;
  
          return $this;
      }
code_tokens: public function setSaveStrategy ( $ strategy ) { if ( ! in_array ( $ strategy , [ self :: SAVE_APPEND , self :: SAVE_REPLACE ] ) ) { $ msg = sprintf ( 'Invalid save strategy "%s"' , $ strategy ) ; throw new InvalidArgumentException ( $ msg ) ; } $ this -> _saveStrategy = $ strategy ; return $ this ; }
docstring: Sets the strategy that should be used for saving.
  
  @param string $strategy the strategy name to be used
  @throws \InvalidArgumentException if an invalid strategy name is passed
  @return $this
docstring_tokens: Sets the strategy that should be used for saving .