public function append($line, bool $trim = true): void
  {
    switch (true)
    {
      case is_string($line):
        $this->appendLine($line, $trim);
        break;

      case is_array($line):
        $this->appendLines($line, $trim);
        break;

      case is_null($line):
        // Nothing to do.
        break;

      default:
        throw new \InvalidArgumentException('Not a string nor an array.');
    }
  }