Commit 51a5ff12 authored by Carsten  Rose's avatar Carsten Rose
Browse files

update phpdoc.

parent bc621024
......@@ -20,35 +20,33 @@ const NESTING_TOKEN_LENGTH = 17;
class BodytextParser {
/**
* @param $bodytext
* @param string $bodyText
*
* @return mixed|string
* @throws UserFormException
*/
public function process($bodytext) {
public function process($bodyText) {
$nestingOpen = '';
$nestingClose = '';
$bodytext = $this->trimAndRemoveCommentAndEmptyLine($bodytext, $nestingOpen, $nestingClose);
$bodyText = $this->trimAndRemoveCommentAndEmptyLine($bodyText, $nestingOpen, $nestingClose);
// Encrypt double curly braces to prevent false positives with nesting: form = {{form}}\n
$bodytext = Support::encryptDoubleCurlyBraces($bodytext);
$bodytext = $this->joinLine($bodytext, $nestingOpen, $nestingClose);
$bodyText = Support::encryptDoubleCurlyBraces($bodyText);
$bodyText = $this->joinLine($bodyText, $nestingOpen, $nestingClose);
$bodytext = $this->encryptNestingDelimeter($bodytext, $nestingOpen, $nestingClose);
$bodytext = $this->unNest($bodytext, $nestingOpen, $nestingClose);
$bodyText = $this->encryptNestingDelimeter($bodyText, $nestingOpen, $nestingClose);
$bodyText = $this->unNest($bodyText, $nestingOpen, $nestingClose);
$bodytext = $this->trimAndRemoveCommentAndEmptyLine($bodytext, $nestingOpen, $nestingClose);
$bodytext = Support::decryptDoubleCurlyBraces($bodytext);
$bodyText = $this->trimAndRemoveCommentAndEmptyLine($bodyText, $nestingOpen, $nestingClose);
$bodyText = Support::decryptDoubleCurlyBraces($bodyText);
if (strpos($bodytext, NESTING_TOKEN_OPEN) !== false) {
if (strpos($bodyText, NESTING_TOKEN_OPEN) !== false) {
throw new UserFormException(
json_encode([ERROR_MESSAGE_TO_USER => 'Report: Missing close delimiter', ERROR_MESSAGE_SUPPORT => $bodytext]), ERROR_MISSING_CLOSE_DELIMITER);
json_encode([ERROR_MESSAGE_TO_USER => 'Report: Missing close delimiter', ERROR_MESSAGE_SUPPORT => $bodyText]), ERROR_MISSING_CLOSE_DELIMITER);
}
return $bodytext;
return $bodyText;
}
/**
......
......@@ -372,7 +372,7 @@ class Store {
* Set or overwrite a complete store.
*
* @param array $dataArray
* @param $store
* @param string $store
* @param bool|false $flagOverwrite
*
* @throws UserFormException
......
......@@ -43,6 +43,12 @@ class QuickFormQueryTest extends TestCase {
//* @throws UserFormException
//*/
/**
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
public function testGetFormName() {
// <empty> bodytext
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment