code: public function renderCallStackItem($file, $line, $class, $method, $args, $index)
      {
          $lines = [];
          $begin = $end = 0;
          if ($file !== null && $line !== null) {
              $line--; // adjust line number from one-based to zero-based
              $lines = @file($file);
              if ($line < 0 || $lines === false || ($lineCount = count($lines)) < $line) {
                  return '';
              }
  
              $half = (int) (($index === 1 ? $this->maxSourceLines : $this->maxTraceSourceLines) / 2);
              $begin = $line - $half > 0 ? $line - $half : 0;
              $end = $line + $half < $lineCount ? $line + $half : $lineCount - 1;
          }
  
          return $this->renderFile($this->callStackItemView, [
              'file' => $file,
              'line' => $line,
              'class' => $class,
              'method' => $method,
              'index' => $index,
              'lines' => $lines,
              'begin' => $begin,
              'end' => $end,
              'args' => $args,
          ]);
      }
docs: Renders a single call stack element.
  @param string|null $file name where call has happened.
  @param int|null $line number on which call has happened.
  @param string|null $class called class name.
  @param string|null $method called function/method name.
  @param array $args array of method arguments.
  @param int $index number of the call stack element.
  @return string HTML content of the rendered call stack element.