original_string: public function setLetterType($letterType): PostageInfo
      {
          if (!in_array($letterType, Envelope::getLetterTypeOptions())) {
              throw new InvalidArgumentException(
                  sprintf('Property %s is not supported for %s', $letterType, __FUNCTION__)
              );
          }
  
          $this->letter['type'] = $letterType;
  
          return $this;
      }
code: public function setLetterType($letterType): PostageInfo
      {
          if (!in_array($letterType, Envelope::getLetterTypeOptions())) {
              throw new InvalidArgumentException(
                  sprintf('Property %s is not supported for %s', $letterType, __FUNCTION__)
              );
          }
  
          $this->letter['type'] = $letterType;
  
          return $this;
      }
code_tokens: public function setLetterType ( $ letterType ) : PostageInfo { if ( ! in_array ( $ letterType , Envelope :: getLetterTypeOptions ( ) ) ) { throw new InvalidArgumentException ( sprintf ( 'Property %s is not supported for %s' , $ letterType , __FUNCTION__ ) ) ; } $ this -> letter [ 'type' ] = $ letterType ; return $ this ; }
docstring: Set the letter type
  
  @param string $letterType
  
  @return self
  @throws InvalidArgumentException
docstring_tokens: Set the letter type