You are here

public function GdprDumpUtilRandom::paragraphs in General Data Protection Regulation 7

Generate paragraphs separated by double new line.

Parameters

int $paragraph_count: The number of paragraphs to generate.

Return value

string The generated paragraphs.

File

modules/gdpr_dump/src/GdprDumpUtilRandom.php, line 206

Class

GdprDumpUtilRandom
Defines a utility class for creating random data.

Code

public function paragraphs($paragraph_count = 12) {
  $output = '';
  for ($i = 1; $i <= $paragraph_count; $i++) {
    $output .= $this
      ->sentences(mt_rand(20, 60)) . "\n\n";
  }
  return $output;
}