original_string: protected function affix($affix, $value, $propagate = true)
  	{
  		$affixes = ['prefix', 'suffix'];
  
  		if (in_array($affix, $affixes)) {
  
  			if (is_scalar($value)) {
  				$this->{$affix} = strval($value);
  				return $this->propagateMutation($affix, $propagate);
  			}
  
  			throw new InvalidArgumentException("The given {$affix} cannot be converted to a string.");
  
  		}
  	}
code: protected function affix($affix, $value, $propagate = true)
  	{
  		$affixes = ['prefix', 'suffix'];
  
  		if (in_array($affix, $affixes)) {
  
  			if (is_scalar($value)) {
  				$this->{$affix} = strval($value);
  				return $this->propagateMutation($affix, $propagate);
  			}
  
  			throw new InvalidArgumentException("The given {$affix} cannot be converted to a string.");
  
  		}
  	}
code_tokens: protected function affix ( $ affix , $ value , $ propagate = true ) { $ affixes = [ 'prefix' , 'suffix' ] ; if ( in_array ( $ affix , $ affixes ) ) { if ( is_scalar ( $ value ) ) { $ this -> { $ affix } = strval ( $ value ) ; return $ this -> propagateMutation ( $ affix , $ propagate ) ; } throw new InvalidArgumentException ( "The given {$affix} cannot be converted to a string." ) ; } }
docstring: Affixes string to generated keys.
  
  @param string $affix Affix type (either 'prefix' or 'suffix')
  @param string $value
  @param bool $propagate
  @return $this
  
  @throws \InvalidArgumentException
docstring_tokens: Affixes string to generated keys .