Commit 3252a22c authored by Wouter Wolters's avatar Wouter Wolters Committed by Markus Klein
Browse files

[CLEANUP] Use correct casting syntax

Resolves: #62664
Releases: master
Change-Id: Ib8e0695fc234ab67a2f73a65737e07cf9a2d19c6
Reviewed-on: http://review.typo3.org/33757


Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarMarkus Klein <klein.t3@reelworx.at>
Tested-by: default avatarMarkus Klein <klein.t3@reelworx.at>
parent fdcabab3
...@@ -221,7 +221,7 @@ class Clipboard { ...@@ -221,7 +221,7 @@ class Clipboard {
if (is_array($CBarr)) { if (is_array($CBarr)) {
foreach ($CBarr as $k => $v) { foreach ($CBarr as $k => $v) {
$p = explode('|', $k); $p = explode('|', $k);
if ((string) $p[0] != (string) $table || $removeDeselected && !$v) { if ((string)$p[0] != (string)$table || $removeDeselected && !$v) {
unset($CBarr[$k]); unset($CBarr[$k]);
} }
} }
...@@ -779,11 +779,11 @@ class Clipboard { ...@@ -779,11 +779,11 @@ class Clipboard {
if ($v) { if ($v) {
list($table, $uid) = explode('|', $k); list($table, $uid) = explode('|', $k);
if ($table != '_FILE') { if ($table != '_FILE') {
if ((!$matchTable || (string) $table == (string) $matchTable) && $GLOBALS['TCA'][$table]) { if ((!$matchTable || (string)$table == (string)$matchTable) && $GLOBALS['TCA'][$table]) {
$list[$k] = $pad == 'normal' ? $v : $uid; $list[$k] = $pad == 'normal' ? $v : $uid;
} }
} else { } else {
if ((string) $table == (string) $matchTable) { if ((string)$table == (string)$matchTable) {
$list[$k] = $v; $list[$k] = $v;
} }
} }
......
...@@ -57,7 +57,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio ...@@ -57,7 +57,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
break; break;
case 'adminUser': case 'adminUser':
if ($this->isUserLoggedIn()) { if ($this->isUserLoggedIn()) {
$result = !((bool) $value xor $this->isAdminUser()); $result = !((bool)$value xor $this->isAdminUser());
return $result; return $result;
} }
break; break;
......
...@@ -44,7 +44,7 @@ abstract class AbstractExtdirectContextMenu extends \TYPO3\CMS\Backend\ContextMe ...@@ -44,7 +44,7 @@ abstract class AbstractExtdirectContextMenu extends \TYPO3\CMS\Backend\ContextMe
$this->setDataProvider($dataProvider); $this->setDataProvider($dataProvider);
} }
/** @var $node \TYPO3\CMS\Backend\Tree\TreeNode */ /** @var $node \TYPO3\CMS\Backend\Tree\TreeNode */
$node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\TreeNode', (array) $nodeData); $node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\TreeNode', (array)$nodeData);
$actions = $this->dataProvider->getActionsForNode($node); $actions = $this->dataProvider->getActionsForNode($node);
return $actions; return $actions;
} }
......
...@@ -40,7 +40,7 @@ class ContextMenuConfiguration extends \TYPO3\CMS\Backend\ContextMenu\Extdirect\ ...@@ -40,7 +40,7 @@ class ContextMenuConfiguration extends \TYPO3\CMS\Backend\ContextMenu\Extdirect\
*/ */
public function getActionsForNodeArray($nodeData) { public function getActionsForNodeArray($nodeData) {
/** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */ /** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
$node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\Pagetree\\PagetreeNode', (array) $nodeData); $node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\Pagetree\\PagetreeNode', (array)$nodeData);
$node->setRecord(\TYPO3\CMS\Backend\Tree\Pagetree\Commands::getNodeRecord($node->getId())); $node->setRecord(\TYPO3\CMS\Backend\Tree\Pagetree\Commands::getNodeRecord($node->getId()));
$this->initDataProvider(); $this->initDataProvider();
$this->dataProvider->setContextMenuType('table.' . $node->getType()); $this->dataProvider->setContextMenuType('table.' . $node->getType());
......
...@@ -133,7 +133,7 @@ class ElementInformationController { ...@@ -133,7 +133,7 @@ class ElementInformationController {
// Check permissions and uid value: // Check permissions and uid value:
if ($this->uid && $GLOBALS['BE_USER']->check('tables_select', $this->table)) { if ($this->uid && $GLOBALS['BE_USER']->check('tables_select', $this->table)) {
if ((string) $this->table == 'pages') { if ((string)$this->table == 'pages') {
$this->pageinfo = BackendUtility::readPageAccess($this->uid, $this->perms_clause); $this->pageinfo = BackendUtility::readPageAccess($this->uid, $this->perms_clause);
$this->access = is_array($this->pageinfo) ? 1 : 0; $this->access = is_array($this->pageinfo) ? 1 : 0;
$this->row = $this->pageinfo; $this->row = $this->pageinfo;
......
...@@ -139,7 +139,7 @@ class MoveElementController { ...@@ -139,7 +139,7 @@ class MoveElementController {
// Reset variable to pick up the module content in: // Reset variable to pick up the module content in:
$code = ''; $code = '';
// IF the table is "pages": // IF the table is "pages":
if ((string) $this->table == 'pages') { if ((string)$this->table == 'pages') {
// Get page record (if accessible): // Get page record (if accessible):
$pageinfo = BackendUtility::readPageAccess($this->page_id, $this->perms_clause); $pageinfo = BackendUtility::readPageAccess($this->page_id, $this->perms_clause);
if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'], $this->perms_clause)) { if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'], $this->perms_clause)) {
...@@ -162,7 +162,7 @@ class MoveElementController { ...@@ -162,7 +162,7 @@ class MoveElementController {
} }
} }
// IF the table is "tt_content": // IF the table is "tt_content":
if ((string) $this->table == 'tt_content') { if ((string)$this->table == 'tt_content') {
// First, get the record: // First, get the record:
$tt_content_rec = BackendUtility::getRecord('tt_content', $this->moveUid); $tt_content_rec = BackendUtility::getRecord('tt_content', $this->moveUid);
// ? // ?
...@@ -245,9 +245,9 @@ class MoveElementController { ...@@ -245,9 +245,9 @@ class MoveElementController {
'back' => '' 'back' => ''
); );
if ($this->page_id) { if ($this->page_id) {
if ((string) $this->table == 'pages') { if ((string)$this->table == 'pages') {
$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '', TRUE); $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '', TRUE);
} elseif ((string) $this->table == 'tt_content') { } elseif ((string)$this->table == 'tt_content') {
$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '', TRUE); $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '', TRUE);
} }
if ($this->R_URI) { if ($this->R_URI) {
......
...@@ -353,7 +353,7 @@ class NewContentElementController { ...@@ -353,7 +353,7 @@ class NewContentElementController {
$showAll = $wizardGroup['show'] === '*'; $showAll = $wizardGroup['show'] === '*';
$groupItems = array(); $groupItems = array();
if (is_array($appendWizards[$groupKey . '.']['elements.'])) { if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
$wizardElements = array_merge((array) $wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']); $wizardElements = array_merge((array)$wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);
} else { } else {
$wizardElements = $wizardGroup['elements.']; $wizardElements = $wizardGroup['elements.'];
} }
......
...@@ -864,7 +864,7 @@ class EditDocumentController { ...@@ -864,7 +864,7 @@ class EditDocumentController {
} }
// Check internals regarding access: // Check internals regarding access:
$isRootLevelRestrictionIgnored = BackendUtility::isRootLevelRestrictionIgnored($table); $isRootLevelRestrictionIgnored = BackendUtility::isRootLevelRestrictionIgnored($table);
if ($hasAccess || (string) $calcPRec['pid'] === '0' && $isRootLevelRestrictionIgnored) { if ($hasAccess || (string)$calcPRec['pid'] === '0' && $isRootLevelRestrictionIgnored) {
$hasAccess = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $calcPRec); $hasAccess = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $calcPRec);
$deniedAccessReason = $GLOBALS['BE_USER']->errorMsg; $deniedAccessReason = $GLOBALS['BE_USER']->errorMsg;
} }
......
...@@ -85,8 +85,8 @@ class FileSystemNavigationFrameController { ...@@ -85,8 +85,8 @@ class FileSystemNavigationFrameController {
$this->currentSubScript = GeneralUtility::_GP('currentSubScript'); $this->currentSubScript = GeneralUtility::_GP('currentSubScript');
$this->cMR = GeneralUtility::_GP('cMR'); $this->cMR = GeneralUtility::_GP('cMR');
$scopeData = (string) GeneralUtility::_GP('scopeData'); $scopeData = (string)GeneralUtility::_GP('scopeData');
$scopeHash = (string) GeneralUtility::_GP('scopeHash'); $scopeHash = (string)GeneralUtility::_GP('scopeHash');
if (!empty($scopeData) && GeneralUtility::hmac($scopeData) === $scopeHash) { if (!empty($scopeData) && GeneralUtility::hmac($scopeData) === $scopeHash) {
$this->scopeData = unserialize($scopeData); $this->scopeData = unserialize($scopeData);
......
...@@ -394,7 +394,7 @@ class LoginController { ...@@ -394,7 +394,7 @@ class LoginController {
$this->redirectToURL = 'index.php?commandLI=setCookie'; $this->redirectToURL = 'index.php?commandLI=setCookie';
} }
} }
if ($redirectToURL = (string) $GLOBALS['BE_USER']->getTSConfigVal('auth.BE.redirectToURL')) { if ($redirectToURL = (string)$GLOBALS['BE_USER']->getTSConfigVal('auth.BE.redirectToURL')) {
$this->redirectToURL = $redirectToURL; $this->redirectToURL = $redirectToURL;
$this->GPinterface = ''; $this->GPinterface = '';
} }
......
...@@ -29,7 +29,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; ...@@ -29,7 +29,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
class SimpleDataHandlerController { class SimpleDataHandlerController {
/** /**
* Array. Accepts options to be set in TCE object. Currently it supports "reverseOrder" (boolean). * Array. Accepts options to be set in TCE object. Currently it supports "reverseOrder" (bool).
* *
* @var array * @var array
*/ */
......
...@@ -162,7 +162,7 @@ class AddController { ...@@ -162,7 +162,7 @@ class AddController {
$flexToolObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools'); $flexToolObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools');
$curValueOfFlexform = $flexToolObj->getArrayValueByPath($this->P['flexFormPath'], $currentFlexFormData); $curValueOfFlexform = $flexToolObj->getArrayValueByPath($this->P['flexFormPath'], $currentFlexFormData);
$insertValue = ''; $insertValue = '';
switch ((string) $this->P['params']['setValue']) { switch ((string)$this->P['params']['setValue']) {
case 'set': case 'set':
$insertValue = $addEl; $insertValue = $addEl;
break; break;
...@@ -177,7 +177,7 @@ class AddController { ...@@ -177,7 +177,7 @@ class AddController {
$data[$this->P['table']][$this->P['uid']][$this->P['field']] = array(); $data[$this->P['table']][$this->P['uid']][$this->P['field']] = array();
$flexToolObj->setArrayValueByPath($this->P['flexFormPath'], $data[$this->P['table']][$this->P['uid']][$this->P['field']], $insertValue); $flexToolObj->setArrayValueByPath($this->P['flexFormPath'], $data[$this->P['table']][$this->P['uid']][$this->P['field']], $insertValue);
} else { } else {
switch ((string) $this->P['params']['setValue']) { switch ((string)$this->P['params']['setValue']) {
case 'set': case 'set':
$data[$this->P['table']][$this->P['uid']][$this->P['field']] = $addEl; $data[$this->P['table']][$this->P['uid']][$this->P['field']] = $addEl;
break; break;
......
...@@ -415,7 +415,7 @@ class FormsController { ...@@ -415,7 +415,7 @@ class FormsController {
$temp_cells[$GLOBALS['LANG']->getLL('forms_fieldName')] = '<input type="text"' . $this->doc->formWidth(10) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][fieldname]" value="' . htmlspecialchars($confData['fieldname']) . '" title="' . $GLOBALS['LANG']->getLL('forms_fieldName', TRUE) . '" />'; $temp_cells[$GLOBALS['LANG']->getLL('forms_fieldName')] = '<input type="text"' . $this->doc->formWidth(10) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][fieldname]" value="' . htmlspecialchars($confData['fieldname']) . '" title="' . $GLOBALS['LANG']->getLL('forms_fieldName', TRUE) . '" />';
} }
// Field configuration depending on the fields type: // Field configuration depending on the fields type:
switch ((string) $confData['type']) { switch ((string)$confData['type']) {
case 'textarea': case 'textarea':
$temp_cells[$GLOBALS['LANG']->getLL('forms_cols')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][cols]" value="' . htmlspecialchars($confData['cols']) . '" title="' . $GLOBALS['LANG']->getLL('forms_cols', TRUE) . '" />'; $temp_cells[$GLOBALS['LANG']->getLL('forms_cols')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][cols]" value="' . htmlspecialchars($confData['cols']) . '" title="' . $GLOBALS['LANG']->getLL('forms_cols', TRUE) . '" />';
$temp_cells[$GLOBALS['LANG']->getLL('forms_rows')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][rows]" value="' . htmlspecialchars($confData['rows']) . '" title="' . $GLOBALS['LANG']->getLL('forms_rows', TRUE) . '" />'; $temp_cells[$GLOBALS['LANG']->getLL('forms_rows')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][rows]" value="' . htmlspecialchars($confData['rows']) . '" title="' . $GLOBALS['LANG']->getLL('forms_rows', TRUE) . '" />';
...@@ -437,7 +437,7 @@ class FormsController { ...@@ -437,7 +437,7 @@ class FormsController {
break; break;
} }
// Field configuration depending on the fields type: // Field configuration depending on the fields type:
switch ((string) $confData['type']) { switch ((string)$confData['type']) {
case 'textarea': case 'textarea':
case 'input': case 'input':
...@@ -651,7 +651,7 @@ class FormsController { ...@@ -651,7 +651,7 @@ class FormsController {
$thisLine[1] = ($vv['required'] ? '*' : '') . str_replace(',', '', (($vv['fieldname'] ? $vv['fieldname'] . '=' : '') . $vv['type'])); $thisLine[1] = ($vv['required'] ? '*' : '') . str_replace(',', '', (($vv['fieldname'] ? $vv['fieldname'] . '=' : '') . $vv['type']));
// Default: // Default:
$tArr = array('', '', '', '', '', ''); $tArr = array('', '', '', '', '', '');
switch ((string) $vv['type']) { switch ((string)$vv['type']) {
case 'textarea': case 'textarea':
if ((int)$vv['cols']) { if ((int)$vv['cols']) {
$tArr[0] = (int)$vv['cols']; $tArr[0] = (int)$vv['cols'];
...@@ -775,7 +775,7 @@ class FormsController { ...@@ -775,7 +775,7 @@ class FormsController {
} else { } else {
$confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0])); $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));
} }
switch ((string) $confData['type']) { switch ((string)$confData['type']) {
case 'select': case 'select':
case 'radio': case 'radio':
$confData['default'] = implode(LF, GeneralUtility::trimExplode(',', $parts[2])); $confData['default'] = implode(LF, GeneralUtility::trimExplode(',', $parts[2]));
...@@ -784,7 +784,7 @@ class FormsController { ...@@ -784,7 +784,7 @@ class FormsController {
$confData['default'] = trim($parts[2]); $confData['default'] = trim($parts[2]);
} }
// Field configuration depending on the fields type: // Field configuration depending on the fields type:
switch ((string) $confData['type']) { switch ((string)$confData['type']) {
case 'textarea': case 'textarea':
$confData['cols'] = $fParts[1]; $confData['cols'] = $fParts[1];
$confData['rows'] = $fParts[2]; $confData['rows'] = $fParts[2];
......
...@@ -96,7 +96,7 @@ class DataPreprocessor { ...@@ -96,7 +96,7 @@ class DataPreprocessor {
$idList = $this->prevPageID; $idList = $this->prevPageID;
} }
if ($GLOBALS['TCA'][$table]) { if ($GLOBALS['TCA'][$table]) {
// For each ID value (integer) we // For each ID value (int) we
$ids = GeneralUtility::trimExplode(',', $idList, TRUE); $ids = GeneralUtility::trimExplode(',', $idList, TRUE);
foreach ($ids as $id) { foreach ($ids as $id) {
// If ID is not blank: // If ID is not blank:
...@@ -181,7 +181,7 @@ class DataPreprocessor { ...@@ -181,7 +181,7 @@ class DataPreprocessor {
* The resulting, processed row is stored in $this->regTableItems_data[$uniqueItemRef], where $uniqueItemRef is "[tablename]_[id-value]" * The resulting, processed row is stored in $this->regTableItems_data[$uniqueItemRef], where $uniqueItemRef is "[tablename]_[id-value]"
* *
* @param string $table The table name * @param string $table The table name
* @param string $id The uid value of the record (integer). Can also be a string (NEW-something) if the record is a NEW record. * @param string $id The uid value of the record (int). Can also be a string (NEW-something) if the record is a NEW record.
* @param int $pid The pid integer. For existing records this is of course the row's "pid" field. For new records it can be either a page id (positive) or a pointer to another record from the SAME table (negative) after which the record should be inserted (or on same page) * @param int $pid The pid integer. For existing records this is of course the row's "pid" field. For new records it can be either a page id (positive) or a pointer to another record from the SAME table (negative) after which the record should be inserted (or on same page)
* @param array $row The row of the current record. If NEW record, then it may be loaded with default values (by eg. fetchRecord()). * @param array $row The row of the current record. If NEW record, then it may be loaded with default values (by eg. fetchRecord()).
* @return void * @return void
...@@ -223,7 +223,7 @@ class DataPreprocessor { ...@@ -223,7 +223,7 @@ class DataPreprocessor {
* The resulting, processed row will be returned. * The resulting, processed row will be returned.
* *
* @param string $table The table name * @param string $table The table name
* @param string $id The uid value of the record (integer). Can also be a string (NEW-something) if the record is a NEW record. * @param string $id The uid value of the record (int). Can also be a string (NEW-something) if the record is a NEW record.
* @param int $pid The pid integer. For existing records this is of course the row's "pid" field. For new records it can be either a page id (positive) or a pointer to another record from the SAME table (negative) after which the record should be inserted (or on same page) * @param int $pid The pid integer. For existing records this is of course the row's "pid" field. For new records it can be either a page id (positive) or a pointer to another record from the SAME table (negative) after which the record should be inserted (or on same page)
* @param array $row The row of the current record. If NEW record, then it may be loaded with default values (by eg. fetchRecord()). * @param array $row The row of the current record. If NEW record, then it may be loaded with default values (by eg. fetchRecord()).
* @param array $TSconfig Tsconfig array * @param array $TSconfig Tsconfig array
......
...@@ -75,7 +75,7 @@ class GroupElement extends AbstractFormElement { ...@@ -75,7 +75,7 @@ class GroupElement extends AbstractFormElement {
. '\', \'RemoveFirstIfFull\', \'' . $maxitems . '\'); ' . $additionalInformation['fieldChangeFunc']['TBE_EDITOR_fieldChanged']; . '\', \'RemoveFirstIfFull\', \'' . $maxitems . '\'); ' . $additionalInformation['fieldChangeFunc']['TBE_EDITOR_fieldChanged'];
} }
// Acting according to either "file" or "db" type: // Acting according to either "file" or "db" type:
switch ((string) $config['internal_type']) { switch ((string)$config['internal_type']) {
case 'file_reference': case 'file_reference':
$config['uploadfolder'] = ''; $config['uploadfolder'] = '';
// Fall through // Fall through
......
...@@ -1276,7 +1276,7 @@ class InlineElement { ...@@ -1276,7 +1276,7 @@ class InlineElement {
* Handle AJAX calls to localize all records of a parent, localize a single record or to synchronize with the original language parent. * Handle AJAX calls to localize all records of a parent, localize a single record or to synchronize with the original language parent.
* *
* @param string $domObjectId The calling object in hierarchy, that requested a new record. * @param string $domObjectId The calling object in hierarchy, that requested a new record.
* @param mixed $type Defines the type 'localize' or 'synchronize' (string) or a single uid to be localized (integer) * @param mixed $type Defines the type 'localize' or 'synchronize' (string) or a single uid to be localized (int)
* @return array An array to be used for JSON * @return array An array to be used for JSON
*/ */
protected function synchronizeLocalizeRecords($domObjectId, $type) { protected function synchronizeLocalizeRecords($domObjectId, $type) {
...@@ -1418,7 +1418,7 @@ class InlineElement { ...@@ -1418,7 +1418,7 @@ class InlineElement {
$top = $this->getStructureLevel(0); $top = $this->getStructureLevel(0);
// Only do some action if the top record and the current record were saved before // Only do some action if the top record and the current record were saved before
if (MathUtility::canBeInterpretedAsInteger($top['uid'])) { if (MathUtility::canBeInterpretedAsInteger($top['uid'])) {
$inlineView = (array) unserialize($GLOBALS['BE_USER']->uc['inlineView']); $inlineView = (array)unserialize($GLOBALS['BE_USER']->uc['inlineView']);
$inlineViewCurrent = &$inlineView[$top['table']][$top['uid']]; $inlineViewCurrent = &$inlineView[$top['table']][$top['uid']];
$expandUids = GeneralUtility::trimExplode(',', $expand); $expandUids = GeneralUtility::trimExplode(',', $expand);
$collapseUids = GeneralUtility::trimExplode(',', $collapse); $collapseUids = GeneralUtility::trimExplode(',', $collapse);
...@@ -2463,7 +2463,7 @@ class InlineElement { ...@@ -2463,7 +2463,7 @@ class InlineElement {
*/ */
static public function updateInlineView(&$uc, $tce) { static public function updateInlineView(&$uc, $tce) {
if (isset($uc['inlineView']) && is_array($uc['inlineView'])) { if (isset($uc['inlineView']) && is_array($uc['inlineView'])) {
$inlineView = (array) unserialize($GLOBALS['BE_USER']->uc['inlineView']); $inlineView = (array)unserialize($GLOBALS['BE_USER']->uc['inlineView']);
foreach ($uc['inlineView'] as $topTable => $topRecords) { foreach ($uc['inlineView'] as $topTable => $topRecords) {
foreach ($topRecords as $topUid => $childElements) { foreach ($topRecords as $topUid => $childElements) {
foreach ($childElements as $childTable => $childRecords) { foreach ($childElements as $childTable => $childRecords) {
......
...@@ -683,7 +683,7 @@ class SelectElement extends AbstractFormElement { ...@@ -683,7 +683,7 @@ class SelectElement extends AbstractFormElement {
} }
// Non-selectable element: // Non-selectable element:
$nonSel = ''; $nonSel = '';
if ((string) $p[1] === '--div--') { if ((string)$p[1] === '--div--') {
$nonSel = ' onclick="this.selected=0;" class="c-divider"'; $nonSel = ' onclick="this.selected=0;" class="c-divider"';
} }
// Icon style for option tag: // Icon style for option tag:
......
...@@ -299,7 +299,7 @@ class SuggestDefaultReceiver { ...@@ -299,7 +299,7 @@ class SuggestDefaultReceiver {
if (!BackendUtility::readPageAccess($uid, $GLOBALS['BE_USER']->getPagePermsClause(1))) { if (!BackendUtility::readPageAccess($uid, $GLOBALS['BE_USER']->getPagePermsClause(1))) {
$retValue = FALSE; $retValue = FALSE;
} }
} elseif (isset($GLOBALS['TCA'][$table]['ctrl']['is_static']) && (bool) $GLOBALS['TCA'][$table]['ctrl']['is_static']) { } elseif (isset($GLOBALS['TCA'][$table]['ctrl']['is_static']) && (bool)$GLOBALS['TCA'][$table]['ctrl']['is_static']) {
$retValue = TRUE; $retValue = TRUE;
} else { } else {
if (!is_array(BackendUtility::readPageAccess($row['pid'], $GLOBALS['BE_USER']->getPagePermsClause(1)))) { if (!is_array(BackendUtility::readPageAccess($row['pid'], $GLOBALS['BE_USER']->getPagePermsClause(1)))) {
......
...@@ -194,7 +194,7 @@ class ElementConditionMatcher { ...@@ -194,7 +194,7 @@ class ElementConditionMatcher {
switch ($operator) { switch ($operator) {
case 'REQ': case 'REQ':
if (strtoupper($operand) === 'TRUE') { if (strtoupper($operand) === 'TRUE') {
$result = (bool) $fieldValue; $result = (bool)$fieldValue;
} else { } else {
$result = !$fieldValue; $result = !$fieldValue;
} }
...@@ -245,7 +245,7 @@ class ElementConditionMatcher { ...@@ -245,7 +245,7 @@ class ElementConditionMatcher {
* @return bool * @return bool
*/ */
protected function matchHideForNonAdminsCondition() { protected function matchHideForNonAdminsCondition() {
return (bool) $this->getBackendUser()->isAdmin(); return (bool)$this->getBackendUser()->isAdmin();
} }
/** /**
......
...@@ -1786,7 +1786,7 @@ class FormEngine { ...@@ -1786,7 +1786,7 @@ class FormEngine {
$typeNum = $GLOBALS['TCA'][$table]['types']['0'] ? 0 : 1; $typeNum = $GLOBALS['TCA'][$table]['types']['0'] ? 0 : 1;
} }
// Force to string. Necessary for eg '-1' to be recognized as a type value. // Force to string. Necessary for eg '-1' to be recognized as a type value.
$typeNum = (string) $typeNum; $typeNum = (string)$typeNum;
return $typeNum; return $typeNum;
} }
...@@ -2589,7 +2589,7 @@ class FormEngine { ...@@ -2589,7 +2589,7 @@ class FormEngine {
} else { } else {
$icon = $iTitle; $icon = $iTitle;
} }
switch ((string) $wConf['type']) { switch ((string)$wConf['type']) {
case 'userFunc': case 'userFunc':
case 'script': case 'script':
...@@ -2676,7 +2676,7 @@ class FormEngine { ...@@ -2676,7 +2676,7 @@ class FormEngine {
$url = $this->backPath . $wScript . (strstr($wScript, '?') ? '' : '?'); $url = $this->backPath . $wScript . (strstr($wScript, '?') ? '' : '?');
// If "script" type, create the links around the icon: // If "script" type, create the links around the icon:
if ((string) $wConf['type'] === 'script') { if ((string)$wConf['type'] === 'script') {
$aUrl = $url . GeneralUtility::implodeArrayForUrl('', array('P' => $params)); $aUrl = $url . GeneralUtility::implodeArrayForUrl('', array('P' => $params));
$outArr[] = '<a href="' . htmlspecialchars($aUrl) . '" onclick="this.blur(); return !TBE_EDITOR.isFormChanged();">' . $icon . '</a>'; $outArr[] = '<a href="' . htmlspecialchars($aUrl) . '" onclick="this.blur(); return !TBE_EDITOR.isFormChanged();">' . $icon . '</a>';
} else { } else {
...@@ -2686,7 +2686,7 @@ class FormEngine { ...@@ -2686,7 +2686,7 @@ class FormEngine {
$params['hmac'] = GeneralUtility::hmac($params['formName'] . $params['itemName'], 'wizard_js'); $params['hmac'] = GeneralUtility::hmac($params['formName'] . $params['itemName'], 'wizard_js');
$params['fieldChangeFunc'] = $fieldChangeFunc; $params['fieldChangeFunc'] = $fieldChangeFunc;
$params['fieldChangeFuncHash'] = GeneralUtility::hmac(serialize($fieldChangeFunc)); $params['fieldChangeFuncHash'] = GeneralUtility::hmac(serialize($fieldChangeFunc));
switch ((string) $wConf['type']) { switch ((string)$wConf['type']) {
case 'popup': case 'popup':
case 'colorbox': case 'colorbox':
// Current form value is passed as P[currentValue]! // Current form value is passed as P[currentValue]!
...@@ -2704,7 +2704,7 @@ class FormEngine { ...@@ -2704,7 +2704,7 @@ class FormEngine {
. 'vHWin.focus();return false;'; . 'vHWin.focus();return false;';
// Setting "colorBoxLinks" - user LATER to wrap around the color box as well: // Setting "colorBoxLinks" - user LATER to wrap around the color box as well:
$colorBoxLinks = array('<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">', '</a>'); $colorBoxLinks = array('<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">', '</a>');
if ((string) $wConf['type'] == 'popup') { if ((string)$wConf['type'] == 'popup') {
$outArr[] = $colorBoxLinks[0] . $icon . $colorBoxLinks[1]; $outArr[] = $colorBoxLinks[0] . $icon . $colorBoxLinks[1];
} }
break; break;
...@@ -2774,7 +2774,7 @@ class FormEngine { ...@@ -2774,7 +2774,7 @@ class FormEngine {
break; break;
} }
// Color wizard colorbox: // Color wizard colorbox:
if ((string) $wConf['type'] === 'colorbox') { if ((string)$wConf['type'] === 'colorbox') {
$dim = GeneralUtility::intExplode('x', $wConf['dim']); $dim = GeneralUtility::intExplode('x', $wConf['dim']);
$dX = MathUtility::forceIntegerInRange($dim[0], 1, 200, 20); $dX = MathUtility::forceIntegerInRange($dim[0], 1, 200, 20);
$dY = MathUtility::forceIntegerInRange($dim[1], 1, 200, 20); $dY = MathUtility::forceIntegerInRange($dim[1], 1, 200, 20);
......