Skip to content

Commit

Permalink
Cleanup fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Mar 25, 2024
1 parent c852608 commit 7f9bda0
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 173 deletions.
26 changes: 13 additions & 13 deletions api/class.mainrenderlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1777,11 +1777,11 @@ public function _getEventsArray()
$GLOBALS['_SESSION']['ameos_formidable']['ajax_services']['tx_ameosformidable']['ajaxevent'][$this->_getSessionDataHashKey(
)]
= [
'requester' => [
'name' => 'tx_ameosformidable',
'xpath' => '/',
],
];
'requester' => [
'name' => 'tx_ameosformidable',
'xpath' => '/',
],
];

break;

Expand All @@ -1805,10 +1805,10 @@ public function _getEventsArray()

$this->oForm->aOnloadEvents['client']['onload:'.$this->_getElementHtmlIdWithoutFormId()]
= [
'name' => $this->_getElementHtmlId(),
'event' => $mEvent,
'eventdata' => $aEvent,
];
'name' => $this->_getElementHtmlId(),
'event' => $mEvent,
'eventdata' => $aEvent,
];
}
}
break;
Expand Down Expand Up @@ -1852,10 +1852,10 @@ public function _getEventsArray()

$this->getForm()->aOnloadEvents['client']['onload:'.$this->_getElementHtmlIdWithoutFormId()]
= [
'name' => $this->_getElementHtmlId(),
'event' => $mEvent,
'eventdata' => $aEvent,
];
'name' => $this->_getElementHtmlId(),
'event' => $mEvent,
'eventdata' => $aEvent,
];
}
break;

Expand Down
10 changes: 5 additions & 5 deletions api/class.tx_ameosformidable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2589,11 +2589,11 @@ public function fetchAjaxServices()
$GLOBALS['_SESSION']['ameos_formidable']['ajax_services']['tx_ameosformidable']['ajaxservice'][$this->_getSessionDataHashKey(
)]
= [
'requester' => [
'name' => 'tx_ameosformidable',
'xpath' => '/',
],
];
'requester' => [
'name' => 'tx_ameosformidable',
'xpath' => '/',
],
];
}
}

Expand Down
108 changes: 54 additions & 54 deletions tests/action/class.tx_mkforms_tests_action_FormBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,61 +133,61 @@ private static function getAction($execute = true)
public function testProcessForm()
{
$sData = [
'fieldset' => [
'texte' => [
'input' => [
'widget-text' => 'Eins',
'widget1-widget2-text' => 'Zwei',
],
'area' => [
'textarea' => 'Sehr Lang!',
],
'fieldset' => [
'texte' => [
'input' => [
'widget-text' => 'Eins',
'widget1-widget2-text' => 'Zwei',
],
'widget-remove' => 'sollte entfernt werden',
'widget-radiobutton' => '3',
'widget-listbox' => '7',
'widget-checkbox' => [
'item-5' => '6',
'item-8' => '9',
'area' => [
'textarea' => 'Sehr Lang!',
],
'widget-date' => '426204000',
'widgetlister' => [
1 => [
'listerdata-uid' => 1,
'listerdata-title' => 'Titel 1',
'listerdata-notInXml' => 'Titel 1',
],
2 => [
'listerdata-uid' => 2,
'listerdata-title' => 'Titel 2',
],
3 => [
'listerdata-uid' => 3,
'listerdata-title' => 'Titel 3',
],
4 => [
'listerdata-uid' => 4,
'listerdata-title' => 'Titel 4',
],
5 => [
'listerdata-uid' => 5,
'listerdata-title' => 'Titel 5',
],
'selected' => '5',
'notInXml' => 'Titel 1',
],
'widget-remove' => 'sollte entfernt werden',
'widget-radiobutton' => '3',
'widget-listbox' => '7',
'widget-checkbox' => [
'item-5' => '6',
'item-8' => '9',
],
'widget-date' => '426204000',
'widgetlister' => [
1 => [
'listerdata-uid' => 1,
'listerdata-title' => 'Titel 1',
'listerdata-notInXml' => 'Titel 1',
],
2 => [
'listerdata-uid' => 2,
'listerdata-title' => 'Titel 2',
],
3 => [
'listerdata-uid' => 3,
'listerdata-title' => 'Titel 3',
],
4 => [
'listerdata-uid' => 4,
'listerdata-title' => 'Titel 4',
],
5 => [
'listerdata-uid' => 5,
'listerdata-title' => 'Titel 5',
],
'selected' => '5',
'notInXml' => 'Titel 1',
],
'widget-submit' => 'Daten absenden',
'widget-thatDoesNotExistInTheXml' => 'valueThatShouldBeRemoved',
'AMEOSFORMIDABLE_SERVEREVENT' => '',
'AMEOSFORMIDABLE_SERVEREVENT_PARAMS' => '',
'AMEOSFORMIDABLE_SERVEREVENT_HASH' => '',
'AMEOSFORMIDABLE_ADDPOSTVARS' => '[{"action":"formData","params":{"widget-submit":"1"}}]',
'AMEOSFORMIDABLE_VIEWSTATE' => '',
'AMEOSFORMIDABLE_SUBMITTED' => 'AMEOSFORMIDABLE_EVENT_SUBMIT_FULL',
'AMEOSFORMIDABLE_SUBMITTER' => '',
'MKFORMS_REQUEST_TOKEN' => self::getAction()->getForm()->generateRequestToken(),
];
],
'widget-submit' => 'Daten absenden',
'widget-thatDoesNotExistInTheXml' => 'valueThatShouldBeRemoved',
'AMEOSFORMIDABLE_SERVEREVENT' => '',
'AMEOSFORMIDABLE_SERVEREVENT_PARAMS' => '',
'AMEOSFORMIDABLE_SERVEREVENT_HASH' => '',
'AMEOSFORMIDABLE_ADDPOSTVARS' => '[{"action":"formData","params":{"widget-submit":"1"}}]',
'AMEOSFORMIDABLE_VIEWSTATE' => '',
'AMEOSFORMIDABLE_SUBMITTED' => 'AMEOSFORMIDABLE_EVENT_SUBMIT_FULL',
'AMEOSFORMIDABLE_SUBMITTER' => '',
'MKFORMS_REQUEST_TOKEN' => self::getAction()->getForm()->generateRequestToken(),
];
$GLOBALS['TSFE']->fe_user->setKey('ses', 'mkforms', ['requestToken' => [self::getAction()->getForm()->getFormId() => self::getAction()->getForm()->generateRequestToken()]]);
$GLOBALS['TSFE']->fe_user->storeSessionData();

Expand Down Expand Up @@ -271,9 +271,9 @@ public function testHandleRequest()
public function testProcessFormThrowsExceptionWithInvalidRequestToken()
{
$sData = [
'AMEOSFORMIDABLE_SUBMITTED' => 'AMEOSFORMIDABLE_EVENT_SUBMIT_FULL',
'MKFORMS_REQUEST_TOKEN' => 'iAmInvalid',
];
'AMEOSFORMIDABLE_SUBMITTED' => 'AMEOSFORMIDABLE_EVENT_SUBMIT_FULL',
'MKFORMS_REQUEST_TOKEN' => 'iAmInvalid',
];
$GLOBALS['TSFE']->fe_user->setKey('ses', 'mkforms', ['requestToken' => [self::getAction()->getForm()->getFormId() => self::getAction()->getForm()->generateRequestToken()]]);
$GLOBALS['TSFE']->fe_user->storeSessionData();

Expand Down
72 changes: 36 additions & 36 deletions tests/api/class.tx_mkforms_tests_api_maindatahandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,46 +40,46 @@ public function setUp(): void
public function testGetRdtValueSubmitEditionRemovesValuesOfNoneWidgets()
{
$sData = [
'fieldset' => [
'texte' => [
'input' => [
'widget-text' => 'Eins',
],
'widget-thatDoesNotExistInTheXml1' => 'valueThatShouldBeRemoved1',
'fieldset' => [
'texte' => [
'input' => [
'widget-text' => 'Eins',
],
'widget-checkbox' => [
'item-5' => '6',
'item-8' => '9',
],
'widgetlister' => [
1 => [
'listerdata-uid' => 1,
'listerdata-title' => 'Titel 1',
'listerdata-thatdoednotexists' => 'Titel 1',
],
2 => [
'listerdata-uid' => 2,
'listerdata-title' => 'Titel 2',
],
3 => [
'listerdata-uid' => 3,
'listerdata-title' => 'Titel 3',
],
4 => [
'listerdata-uid' => 4,
'listerdata-title' => 'Titel 4',
],
5 => [
'listerdata-uid' => 5,
'listerdata-title' => 'Titel 5',
],
'selected' => '5',
'widget-thatDoesNotExistInTheXml1' => 'valueThatShouldBeRemoved1',
],
'widget-checkbox' => [
'item-5' => '6',
'item-8' => '9',
],
'widgetlister' => [
1 => [
'listerdata-uid' => 1,
'listerdata-title' => 'Titel 1',
'listerdata-thatdoednotexists' => 'Titel 1',
],
'widget-thatDoesNotExistInTheXml2' => 'valueThatShouldBeRemoved2',
2 => [
'listerdata-uid' => 2,
'listerdata-title' => 'Titel 2',
],
3 => [
'listerdata-uid' => 3,
'listerdata-title' => 'Titel 3',
],
4 => [
'listerdata-uid' => 4,
'listerdata-title' => 'Titel 4',
],
5 => [
'listerdata-uid' => 5,
'listerdata-title' => 'Titel 5',
],
'selected' => '5',
'listerdata-thatdoednotexists' => 'Titel 1',
],
'widget-thatDoesNotExistInTheXml3' => 'valueThatShouldBeRemoved3',
];
'widget-thatDoesNotExistInTheXml2' => 'valueThatShouldBeRemoved2',
],
'widget-thatDoesNotExistInTheXml3' => 'valueThatShouldBeRemoved3',
];
$_POST['radioTestForm'] = $sData;

$oForm = tx_mkforms_tests_Util::getForm();
Expand Down
10 changes: 5 additions & 5 deletions tests/class.tx_mkforms_tests_Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public static function getDefaultFormConfig($bCsrfProtection = true)
'generic.' => [
'xml' => 'EXT:mkforms/tests/xml/renderlets.xml',
'addfields.' => [
'widget-addfield' => 'addfield feld',
'widget-remove' => 'unset',
],
'widget-addfield' => 'addfield feld',
'widget-remove' => 'unset',
],
'fieldSeparator' => '-',
'addPostVars' => 1,
'formconfig.' => [
Expand Down Expand Up @@ -166,8 +166,8 @@ public static function setRequestTokenForFormId(
'ses',
'mkforms',
['requestToken' => [
$formId => $requestToken,
],
$formId => $requestToken,
],
]
);
$GLOBALS['TSFE']->fe_user->storeSessionData();
Expand Down
54 changes: 27 additions & 27 deletions tests/util/class.tx_mkforms_tests_util_DivTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,39 @@ public function testToCamelCase()
public function testGetSetupByKeys()
{
$aConfig = [
'lib.' => [
'mkforms.' => [
'formbase.' => [
'testmode' => 1,
],
],
'mkextension.' => [
'installed' => 1,
'lib.' => [
'mkforms.' => [
'formbase.' => [
'testmode' => 1,
],
],
'plugin.' => [
'tx_mkforms' => 'USER_INT',
'tx_mkforms.' => [
'genericTemplate' => 'EXT:mkforms/Resources/Private/Templates/formonly.html',
],
'tx_mkextension.' => [
'extensionTemplate' => 'EXT:mkextension/templates/template.html',
],
'mkextension.' => [
'installed' => 1,
],
],
'plugin.' => [
'tx_mkforms' => 'USER_INT',
'tx_mkforms.' => [
'genericTemplate' => 'EXT:mkforms/Resources/Private/Templates/formonly.html',
],
'tx_mkextension.' => [
'extensionTemplate' => 'EXT:mkextension/templates/template.html',
],
'config.' => [
'tx_mkforms.' => [
'cache.' => [
'tsPaths' => 0,
],
],
'config.' => [
'tx_mkforms.' => [
'cache.' => [
'tsPaths' => 0,
],
],
];
],
];
$aWill = [
'lib' => 1,
'plugin.' => [
'tx_mkforms' => 1,
],
];
'lib' => 1,
'plugin.' => [
'tx_mkforms' => 1,
],
];
$aArray = tx_mkforms_util_Div::getSetupByKeys($aConfig, $aWill);
self::assertTrue(array_key_exists('lib.', $aArray), 'lib. not found in array.');
self::assertTrue(array_key_exists('mkforms.', $aArray['lib.']), 'lib.mkforms. not found in array.');
Expand Down
6 changes: 3 additions & 3 deletions tests/util/class.tx_mkforms_tests_util_FormBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public function testGetConfigurationValueDeep()
Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(
tx_mkforms_tests_Util::getDefaultFormConfig(true),
['myConf.' => [
'path' => 'TEXT',
'path.' => ['value' => 'textvalue'],
],
'path' => 'TEXT',
'path.' => ['value' => 'textvalue'],
],
]
)
);
Expand Down
Loading

0 comments on commit 7f9bda0

Please sign in to comment.