Dump function body contained inside brackets.

@return string
336302
public function dumpBody()
    {
        $lines = file($this->getFileName());
        $startLine = $this->getStartLine();
        $endLine = $this->getEndLine();
        $lines[$startLine - 1] = explode('{', $lines[$startLine - 1]);
        $lines[$startLine - 1] = end($lines[$startLine - 1]);
        $end = mb_strrpos($lines[$endLine - 1], '}');
        if ($end !== false) {
            $lines[$endLine - 1] = mb_substr($lines[$endLine - 1], 0, $end);
        }
        $lines[$endLine - 1] .= '}';

        $code = '';
        for ($line = $startLine - 1; $line < $endLine; $line++) {
            $code .= $lines[$line];
        }

        return $code;
    }
1256504
function dump(){
		asort( $this->names, SORT_STRING );
		$t = max( 2, strlen( (string) $this->i ) );
		foreach( $this->names as $i => $n ){
			$i = str_pad( $i, $t, ' ', STR_PAD_LEFT );
			echo "$i => $n \n";
		}
	}
1203452
function code_body() {
    // Sanity checks already done at this point; no need to catch exception.
    $mb_task_handler_analyze = \DrupalCodeBuilder\Factory::getTask('AnalyzeModule');

    $hooks = $mb_task_handler_analyze->getInventedHooks($this->component_data['root_component_name']);

    // Build an array of code pieces.
    $code_pieces = array();

    // The docblock grouping.
    $code_pieces['group'] = <<<EOT
/**
 * @addtogroup hooks
 * @{
 */

EOT;

    foreach ($hooks as $hook_short_name => $parameters) {
      $code_pieces[$hook_short_name] = $this->hook_code($hook_short_name, $parameters);
    }

    // Add lines from child function components.
    // Function data has been set by buildComponentContents().
    foreach ($this->functions as $component_name => $function_lines) {
      // Blank line after the function.
      $function_lines[] = '';

      $code_pieces[$component_name] = implode("\n", $function_lines);
    }

    // The docblock grouping.
    $code_pieces['end_group'] = <<<EOT
/**
 * @} End of "addtogroup hooks".
 */

EOT;

    return $code_pieces;
  }
218599
public function dumpObject()
    {
        $date = $this->age->format('Y-m-d');
        $string = "Engine: $this->engine \n";
        $string .= "Keyword: $this->keyword \n";
        $string .= "PageUrl: $this->pageUrl \n";
        $string .= "PageNumber: $this->pageNumber \n";
        $string .= "Date: $date \n";
        $string .= "Entries: \n";
        for ($i = 0; $i < count($this->entries); $i++) {
            $url     = $this->entries[$i]['url'];
            $title   = $this->entries[$i]['title'];
            $snippet = $this->entries[$i]['snippet'];
            $pos = $i + 1;
            $string .= "    $pos: \n";
            $string .= "        Url: $url\n";
            $string .= "        Title: $title\n";
            $string .= "        Snippet: $snippet\n";
        }
        return $string;
    }
864321
public static function get_dump(){
    $args = \func_get_args();
    $st = '';
    foreach ( $args as $a ){
      $r = $a;
      if ( \is_null($a) ){
        $r = 'null';
      }
      else if ( $a === false ){
        $r = 'false';
      }
      else if ( $a === true ){
        $r = 'true';
      }
      else if ( $a === 0 ){
        $r = '0';
      }
      else if ( $a === '' ){
        $r = '""';
      }
      else if ( $a === [] ){
        $r = '[]';
      }
      else if ( !$a ){
        $r = '0';
      }
      else if ( !\is_string($a) && \is_callable($a) ){
        $r = 'Function';
      }
      else if ( \is_object($a) ){
        $n = \get_class($a);
        if ( $n === 'stdClass' ){
          $r = str::export($a);
        }
        else{
          $r = $n.' Object';
        }
      }
      else if ( \is_array($a) ){
        $r = str::export($a);
      }
      else if ( \is_resource($a) ){
        $r = 'Resource '.get_resource_type($a);
      }
      else if ( str::is_buid($a) ){
        $r = '0x'.bin2hex($a);
      }
      $st .= $r.PHP_EOL;
    }
    return PHP_EOL.$st.PHP_EOL;
  }
1308302
public function toJsObject()
    {
        $strParams = $this->strParamsArray ? implode(', ', $this->strParamsArray) : '';
        return 'function(' . $strParams . ') {' . $this->strBody . '}';
    }
692244
function getNtext(): \Closure {
    return function($value, \Mustache_LambdaHelper $helper) {
      if (!isset($value)) return \Yii::$app->formatter->nullDisplay;
      return preg_replace('/\r?\n/', '<br>', HtmlHelper::encode($helper->render($value)));
    };
  }
619091
public function backupStructure(): string
	{
		// Fairly easy for SQLite...just query the master table
		$sql = 'SELECT "sql" FROM "sqlite_master"';
		$res = $this->getDriver()->query($sql);
		$result = $res->fetchAll(PDO::FETCH_ASSOC);

		$sqlArray = [];

		foreach($result as $r)
		{
			$sqlArray[] = $r['sql'];
		}

		return implode(";\n", $sqlArray) . ";";
	}
547897
private function getDumpFileHeader()
    {
        $header = '';
        if (!$this->dumpSettings['skip-comments']) {
            // Some info about software, source and time
            $header = "-- mysqldump-php https://github.com/ifsnop/mysqldump-php".PHP_EOL.
                    "--".PHP_EOL.
                    "-- Host: {$this->host}\tDatabase: {$this->dbName}".PHP_EOL.
                    "-- ------------------------------------------------------".PHP_EOL;

            if (!empty($this->version)) {
                $header .= "-- Server version \t".$this->version.PHP_EOL;
            }

            if (!$this->dumpSettings['skip-dump-date']) {
                $header .= "-- Date: ".date('r').PHP_EOL.PHP_EOL;
            }
        }
        return $header;
    }
151535
protected function getRoutineArgs(): string
  {
    $ret = '';

    foreach ($this->routine['parameters'] as $parameter_info)
    {
      $mangledName = $this->nameMangler->getParameterName($parameter_info['parameter_name']);

      if ($ret) $ret .= ',';
      $ret .= DataTypeHelper::escapePhpExpression($parameter_info, '$'.$mangledName, $this->lobAsStringFlag);
    }

    return $ret;
  }
333624
public function getTraceAsString() {
		$lines = array ();
		for( $i = 0; $i < count($this->trace); $i++ ){
			$a = $this->trace[$i];
			$call = "{$a['function']}()";
			if( isset($a['class']) ){
				$call = "{$a['class']}{$a['type']}$call";
			}
			$lines[] = "#$i {$a['file']}({$a['line']}): $call";
		} 
		$lines[] = "#$i {main}";
		return implode( "\n", $lines );
	}
297224
public function dump()
        {
            $objects = func_get_args();
            $content = "\n<pre>\n";

            foreach($objects as $object) {
                $content .= print_r($object, true);
            }

            return $content . "\n</pre>\n";
        }
844922
final public function getTransformedBody()
    {
        $encoding = (isset($this->headers["Content-Transfer-Encoding"])) ? $this->headers["Content-Transfer-Encoding"] : "";

        $rawBody = $this->getRawBody();

        switch ($encoding) {
            case "quoted-printable":
                return quoted_printable_decode($rawBody);
                break;
            case "base64":
                return base64_decode($rawBody);
                break;
            default:
                return $rawBody;
        }
    }
105183
final public function getBodyText(): ?string
    {
        $iterator = new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);
        foreach ($iterator as $part) {
            if (self::SUBTYPE_PLAIN === $part->getSubtype()) {
                return $part->getDecodedContent();
            }
        }

        // If message has no parts, return content of message itself.
        if (self::SUBTYPE_PLAIN === $this->getSubtype()) {
            return $this->getDecodedContent();
        }

        return null;
    }
1252807
public function toString() {
		$output = $this->getStatusLine() . "\r\n";
		foreach ($this->getHeaders() as $header) {
			$output .= $header . "\r\n";
		}
		$output .= "\r\n";
		$output .= $this->getBody();
		return $output;
	}
975364
public function dump()
	{
		$pdo = $this->pdo();

		$sql = '';

		foreach ($this->list_tables() as $table)
		{
			$query = $pdo->query("SELECT * FROM `{$table}`");

			while ($row = $query->fetch(\PDO::FETCH_NUM)) 
			{
				$values = array();

				foreach ($row as $column) 
				{
					$values[] = is_null($column) ? 'NULL' : $pdo->quote($column);
				}

				$sql .= "INSERT INTO `{$table}` VALUES (".join(',', $values). ");\n";
			}
		}

		return $sql;
	}
533922
function getStackDump() {
		$dump = "";
		$stackTypes = array(
			"FUNCTION",
			"INTERFACE",
			"CLASS"
		);
		foreach ($this->statements as $item) {
			$dump .= $item->type;
			if (in_array($item->type, $stackTypes)) {
				$dump .= "(" . $item->name . ")";
			}
			$dump .= " -> ";
		}

		return $dump;
	}