original_string: public function str($value)
      {
          if (is_array($value)) {
              $allScalar = function ($a, $b) {
                  return $a && is_scalar($b);
              };
              if (!array_reduce($value, $allScalar, true)) {
                  throw new UnexpectedValueException("Unexpected complex type " . Util::toPhp($value));
              }
              return join(' ', $value);
          }
          return (string)$value;
      }
code: public function str($value)
      {
          if (is_array($value)) {
              $allScalar = function ($a, $b) {
                  return $a && is_scalar($b);
              };
              if (!array_reduce($value, $allScalar, true)) {
                  throw new UnexpectedValueException("Unexpected complex type " . Util::toPhp($value));
              }
              return join(' ', $value);
          }
          return (string)$value;
      }
code_tokens: public function str ( $ value ) { if ( is_array ( $ value ) ) { $ allScalar = function ( $ a , $ b ) { return $ a && is_scalar ( $ b ) ; } ; if ( ! array_reduce ( $ value , $ allScalar , true ) ) { throw new UnexpectedValueException ( "Unexpected complex type " . Util :: toPhp ( $ value ) ) ; } return join ( ' ' , $ value ) ; } return ( string ) $ value ; }
docstring: Convert the value to a string.
  
  @param mixed $value
  @return string
  @throws \UnexpectedValueException
docstring_tokens: Convert the value to a string .