original_string: public function getTraceSaveAsString()
      {
          $traces   = $this->getTrace();
          $messages = ['STACK TRACE DETAILS : '];
  
          foreach ($traces as $index => $trace) {
              $message = sprintf('#%d ', $index + 1);
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['file'])) {
                  if (!is_string($trace['file'])) {
                      $message .= '[Unknown Function]: ';
                  } else {
                      $line = 0;
  
                      /** @noinspection UnSafeIsSetOverArrayInspection */
                      if (isset($trace['line']) && is_int($trace['line'])) {
                          $line = $trace['line'];
                      }
  
                      $message .= sprintf('%s(%d): ', $trace['file'], $line);
                  }
              } else {
                  $message .= '[Internal Function]: ';
              }
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['class']) && is_string($trace['class'])) {
                  $message .= $trace['class'] . ' ';
              }
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['type']) && is_string($trace['type'])) {
                  $message .= $trace['type'] . ' ';
              }
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['function']) && is_string($trace['function'])) {
                  $message .= $trace['function'] . '(';
  
                  /** @noinspection UnSafeIsSetOverArrayInspection */
                  if (isset($trace['args']) && count($trace['args']) > 0) {
                      /** @var array $arguments */
                      $arguments    = $trace['args'];
                      $argVariables = [];
  
                      foreach ($arguments as $argument) {
                          $argVariables[] = $this->switchType($argument);
                      }
  
                      $message .= implode(', ', $argVariables);
                  }
  
                  $message .= ')';
              }
  
              $messages[] = trim($message);
          }
  
          return implode("\n", $messages);
      }
code: public function getTraceSaveAsString()
      {
          $traces   = $this->getTrace();
          $messages = ['STACK TRACE DETAILS : '];
  
          foreach ($traces as $index => $trace) {
              $message = sprintf('#%d ', $index + 1);
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['file'])) {
                  if (!is_string($trace['file'])) {
                      $message .= '[Unknown Function]: ';
                  } else {
                      $line = 0;
  
                      /** @noinspection UnSafeIsSetOverArrayInspection */
                      if (isset($trace['line']) && is_int($trace['line'])) {
                          $line = $trace['line'];
                      }
  
                      $message .= sprintf('%s(%d): ', $trace['file'], $line);
                  }
              } else {
                  $message .= '[Internal Function]: ';
              }
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['class']) && is_string($trace['class'])) {
                  $message .= $trace['class'] . ' ';
              }
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['type']) && is_string($trace['type'])) {
                  $message .= $trace['type'] . ' ';
              }
  
              /** @noinspection UnSafeIsSetOverArrayInspection */
              if (isset($trace['function']) && is_string($trace['function'])) {
                  $message .= $trace['function'] . '(';
  
                  /** @noinspection UnSafeIsSetOverArrayInspection */
                  if (isset($trace['args']) && count($trace['args']) > 0) {
                      /** @var array $arguments */
                      $arguments    = $trace['args'];
                      $argVariables = [];
  
                      foreach ($arguments as $argument) {
                          $argVariables[] = $this->switchType($argument);
                      }
  
                      $message .= implode(', ', $argVariables);
                  }
  
                  $message .= ')';
              }
  
              $messages[] = trim($message);
          }
  
          return implode("\n", $messages);
      }
code_tokens: public function getTraceSaveAsString ( ) { $ traces = $ this -> getTrace ( ) ; $ messages = [ 'STACK TRACE DETAILS : ' ] ; foreach ( $ traces as $ index => $ trace ) { $ message = sprintf ( '#%d ' , $ index + 1 ) ; /** @noinspection UnSafeIsSetOverArrayInspection */ if ( isset ( $ trace [ 'file' ] ) ) { if ( ! is_string ( $ trace [ 'file' ] ) ) { $ message .= '[Unknown Function]: ' ; } else { $ line = 0 ; /** @noinspection UnSafeIsSetOverArrayInspection */ if ( isset ( $ trace [ 'line' ] ) && is_int ( $ trace [ 'line' ] ) ) { $ line = $ trace [ 'line' ] ; } $ message .= sprintf ( '%s(%d): ' , $ trace [ 'file' ] , $ line ) ; } } else { $ message .= '[Internal Function]: ' ; } /** @noinspection UnSafeIsSetOverArrayInspection */ if ( isset ( $ trace [ 'class' ] ) && is_string ( $ trace [ 'class' ] ) ) { $ message .= $ trace [ 'class' ] . ' ' ; } /** @noinspection UnSafeIsSetOverArrayInspection */ if ( isset ( $ trace [ 'type' ] ) && is_string ( $ trace [ 'type' ] ) ) { $ message .= $ trace [ 'type' ] . ' ' ; } /** @noinspection UnSafeIsSetOverArrayInspection */ if ( isset ( $ trace [ 'function' ] ) && is_string ( $ trace [ 'function' ] ) ) { $ message .= $ trace [ 'function' ] . '(' ; /** @noinspection UnSafeIsSetOverArrayInspection */ if ( isset ( $ trace [ 'args' ] ) && count ( $ trace [ 'args' ] ) > 0 ) { /** @var array $arguments */ $ arguments = $ trace [ 'args' ] ; $ argVariables = [ ] ; foreach ( $ arguments as $ argument ) { $ argVariables [ ] = $ this -> switchType ( $ argument ) ; } $ message .= implode ( ', ' , $ argVariables ) ; } $ message .= ')' ; } $ messages [ ] = trim ( $ message ) ; } return implode ( "\n" , $ messages ) ; }
docstring: Gets the stack trace as a string.
  
  @link  http://php.net/manual/en/exception.gettraceasstring.php
  
  @return string
docstring_tokens: Gets the stack trace as a string .