original_string: public function toArray()
      {
          $errorInfo['code'] = $this->getCode();
          $errorInfo['context'] = $this->getContext();
          $errorInfo['message'] = htmlentities($this->getMessage());
  
          if (config('app.debug', false)) {
              $trace = $this->getTraceAsString();
              $trace = str_replace(["\n", "#"], ["", "<br>"], $trace);
              $traceArray = explode("<br>", $trace);
              $cleanTrace = [];
              foreach ($traceArray as $k => $v) {
                  if (!empty($v)) {
                      $cleanTrace[] = $v;
                  }
              }
              $errorInfo['trace'] = $cleanTrace;
          }
  
          return $errorInfo;
      }
code: public function toArray()
      {
          $errorInfo['code'] = $this->getCode();
          $errorInfo['context'] = $this->getContext();
          $errorInfo['message'] = htmlentities($this->getMessage());
  
          if (config('app.debug', false)) {
              $trace = $this->getTraceAsString();
              $trace = str_replace(["\n", "#"], ["", "<br>"], $trace);
              $traceArray = explode("<br>", $trace);
              $cleanTrace = [];
              foreach ($traceArray as $k => $v) {
                  if (!empty($v)) {
                      $cleanTrace[] = $v;
                  }
              }
              $errorInfo['trace'] = $cleanTrace;
          }
  
          return $errorInfo;
      }
code_tokens: public function toArray ( ) { $ errorInfo [ 'code' ] = $ this -> getCode ( ) ; $ errorInfo [ 'context' ] = $ this -> getContext ( ) ; $ errorInfo [ 'message' ] = htmlentities ( $ this -> getMessage ( ) ) ; if ( config ( 'app.debug' , false ) ) { $ trace = $ this -> getTraceAsString ( ) ; $ trace = str_replace ( [ "\n" , "#" ] , [ "" , "<br>" ] , $ trace ) ; $ traceArray = explode ( "<br>" , $ trace ) ; $ cleanTrace = [ ] ; foreach ( $ traceArray as $ k => $ v ) { if ( ! empty ( $ v ) ) { $ cleanTrace [ ] = $ v ; } } $ errorInfo [ 'trace' ] = $ cleanTrace ; } return $ errorInfo ; }
docstring: Convert this exception to array output
  
  @return array
docstring_tokens: Convert this exception to array output