[BUGFIX] CGL violations FunctionCallArgumentSpacingSpaceBeforeComma
authorRoland Waldner <most.wanted@gmx.at>
Fri, 25 May 2012 12:24:53 +0000 (14:24 +0200)
committerJigal van Hemert <jigal@xs4all.nl>
Fri, 25 May 2012 18:34:58 +0000 (20:34 +0200)
There are violations against the CGL rule
"FunctionCallArgumentSpacingSpaceBeforeComma". These will be reduced.

Change-Id: Ic57e4ec40b2344c13020f643b6d5c0c9c76d15a9
Resolves: #37488
Releases: 6.0
Reviewed-on: http://review.typo3.org/11607
Reviewed-by: Oliver Klee
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
13 files changed:
t3lib/class.t3lib_div.php
t3lib/l10n/class.t3lib_l10n_store.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/class.tslib_search.php
typo3/sysext/cms/tslib/media/scripts/gmenu_foldout.php
typo3/sysext/impexp/class.tx_impexp.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php
typo3/sysext/saltedpasswords/tests/tx_saltedpasswords_salts_factoryTest.php
typo3/sysext/scheduler/tests/class.tx_scheduler_croncmd_normalizeTest.php
typo3/sysext/statictemplates/media/scripts/gmenu_foldout.php

index 072dcbd..173a5cd 100644 (file)
@@ -513,7 +513,7 @@ final class t3lib_div {
                        $hex = self::normalizeIPv6($hex);
                                // Replace colon to nothing
                        $hex = str_replace(':', '', $hex);
-                       $bin = pack("H*" , $hex);
+                       $bin = pack("H*", $hex);
                }
                return $bin;
        }
@@ -530,7 +530,7 @@ final class t3lib_div {
                if (defined('AF_INET6')) {
                        $hex = inet_ntop($bin);
                } else {
-                       $hex = unpack("H*" , $bin);
+                       $hex = unpack("H*", $bin);
                        $hex = chunk_split($hex[1], 4, ':');
                                // Strip last colon (from chunk_split)
                        $hex = substr($hex, 0, -1);
index 4cc4993..ecb1931 100644 (file)
@@ -204,7 +204,7 @@ class t3lib_l10n_Store implements t3lib_Singleton {
         */
        public function getFileReferenceWithoutExtension($fileReference) {
                if (!isset($this->configuration[$fileReference]['fileReferenceWithoutExtension'])) {
-                       $this->configuration[$fileReference]['fileReferenceWithoutExtension'] = preg_replace('/\.[a-z0-9]+$/i' , '' , $fileReference);
+                       $this->configuration[$fileReference]['fileReferenceWithoutExtension'] = preg_replace('/\.[a-z0-9]+$/i', '', $fileReference);
                }
                return $this->configuration[$fileReference]['fileReferenceWithoutExtension'];
        }
index a208f49..333e7b1 100755 (executable)
@@ -485,7 +485,7 @@ class SC_db_layout {
                        $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');             // SHARED page-TSconfig settings.
                        $this->colPosList = strcmp(trim($this->modTSconfig['properties']['tt_content.']['colPos_list']),'') ? trim($this->modTSconfig['properties']['tt_content.']['colPos_list']) : $modTSconfig_SHARED['properties']['colPos_list'];
                        if (!strcmp($this->colPosList,'')) {
-                               $backendLayout = t3lib_div::callUserFunction( 'EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getSelectedBackendLayout' , $this->id, $this );
+                               $backendLayout = t3lib_div::callUserFunction( 'EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getSelectedBackendLayout', $this->id, $this );
 
                                if(count($backendLayout['__colPosList'])) {
                                        $this->colPosList = implode(',', $backendLayout['__colPosList']);
@@ -1019,7 +1019,7 @@ class SC_db_layout {
                                        // Setting up the tt_content columns to show:
                                if (is_array($GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'])) {
                                        $colList = array();
-                                       $tcaItems = t3lib_div::callUserFunction( 'EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getColPosListItemsParsed' , $this->id, $this );
+                                       $tcaItems = t3lib_div::callUserFunction( 'EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getColPosListItemsParsed', $this->id, $this );
                                        foreach($tcaItems as $temp) {
                                                $colList[] = $temp[1];
                                        }
index ed6e3fc..cd0df28 100644 (file)
@@ -3544,7 +3544,7 @@ if (version == "n3") {
                }
 
                $pageName = $this->config['config']['stat_apache_pagenames'] ? $this->config['config']['stat_apache_pagenames'] : '[path][title]--[uid].html';
-               $pageName = str_replace('[title]', $shortTitle , $pageName);
+               $pageName = str_replace('[title]', $shortTitle, $pageName);
                $pageName = str_replace('[uid]', $this->page['uid'], $pageName);
                $pageName = str_replace('[alias]', $this->page['alias'], $pageName);
                $pageName = str_replace('[type]', $this->type, $pageName);
@@ -4042,7 +4042,7 @@ if (version == "n3") {
                        $this->content = str_replace('"typo3conf/ext/', '"'.$this->absRefPrefix.'typo3conf/ext/', $this->content);
                        $this->content = str_replace('"' . TYPO3_mainDir . 'contrib/', '"' . $this->absRefPrefix . TYPO3_mainDir . 'contrib/', $this->content);
                        $this->content = str_replace('"' . TYPO3_mainDir . 'ext/', '"' . $this->absRefPrefix . TYPO3_mainDir . 'ext/', $this->content);
-                       $this->content = str_replace('"' . TYPO3_mainDir . 'sysext/' , '"' . $this->absRefPrefix . TYPO3_mainDir . 'sysext/', $this->content);
+                       $this->content = str_replace('"' . TYPO3_mainDir . 'sysext/', '"' . $this->absRefPrefix . TYPO3_mainDir . 'sysext/', $this->content);
                        $this->content = str_replace('"'.$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'], '"'.$this->absRefPrefix.$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'], $this->content);
                        $this->content = str_replace('"' . $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'], '"' . $this->absRefPrefix . $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'], $this->content);
                        // Process additional directories
@@ -4140,7 +4140,7 @@ if (version == "n3") {
                $this->content = preg_replace('/(<(?:a|area).*?href=")(#[^"]*")/i', '${1}' . htmlspecialchars($scriptPath) . '${2}', $originalContent);
                        // There was an error in the call to preg_replace, so keep the original content (behavior prior to PHP 5.2)
                if (preg_last_error() > 0) {
-                       t3lib_div::sysLog('preg_replace returned error-code: ' . preg_last_error().' in function prefixLocalAnchorsWithScript. Replacement not done!' , 'cms', 4);
+                       t3lib_div::sysLog('preg_replace returned error-code: ' . preg_last_error().' in function prefixLocalAnchorsWithScript. Replacement not done!', 'cms', 4);
                        $this->content = $originalContent;
                }
        }
index ab65eb9..9f248ef 100644 (file)
@@ -993,7 +993,7 @@ class tslib_pibase {
         * @param       string          If set, this is taken as the first part of the query instead of what is created internally. Basically this should be a query starting with "FROM [table] WHERE ... AND ...". The $addWhere clauses and all the other stuff is still added. Only the tables and PID selecting clauses are bypassed. May be deprecated in the future!
         * @return      pointer         SQL result pointer
         */
-       function pi_exec_query($table, $count=0 ,$addWhere='' ,$mm_cat='' ,$groupBy='' ,$orderBy='', $query='') {
+       function pi_exec_query($table, $count=0, $addWhere='', $mm_cat='', $groupBy='', $orderBy='', $query='') {
                        // Begin Query:
                if (!$query) {
                                // Fetches the list of PIDs to select from.
index d782419..5964e51 100644 (file)
@@ -68,13 +68,13 @@ class tslib_search {
        var $default_operator = 'AND';                                                  // Standard SQL-operator between words
        var $operator_translate_table_caseinsensitive = TRUE;
        var $operator_translate_table = Array (                                 // case-sensitiv. Defineres the words, which will be operators between words
-               Array ('+' , 'AND'),
-               Array ('|' , 'AND'),
-               Array ('-' , 'AND NOT'),
+               Array ('+', 'AND'),
+               Array ('|', 'AND'),
+               Array ('-', 'AND NOT'),
                        // english
-               Array ('and' , 'AND'),
-               Array ('or' , 'OR'),
-               Array ('not' , 'AND NOT'),
+               Array ('and', 'AND'),
+               Array ('or', 'OR'),
+               Array ('not', 'AND NOT'),
        );
 
        // Internal
index cfef1ec..fb3d74c 100755 (executable)
@@ -141,12 +141,12 @@ class tslib_gmenu_foldout extends tslib_gmenu {
         * @return      string          Empty string! (Since $GLOBALS['TSFE']->divSection is set with the <div>-sections used in the menu)
         */
        function extProc_finish() {
-               $bHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['bottomHeight']?$this->mconf['bottomHeight']:100) ,0,3000);
+               $bHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['bottomHeight']?$this->mconf['bottomHeight']:100), 0, 3000);
                $bottomContent = $this->mconf['bottomContent'] ? $GLOBALS['TSFE']->cObj->cObjGetSingle($this->mconf['bottomContent'],$this->mconf['bottomContent.'], '/GMENU_FOLDOUT/.bottomContent') : '';
                $adjustTopHeights = intval($this->mconf['adjustItemsH']);
                $adjustSubHeights = intval($this->mconf['adjustSubItemsH']);
-               $mWidth = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuWidth']?$this->mconf['menuWidth']:170) ,0,3000);
-               $mHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuHeight']?$this->mconf['menuHeight']:400) ,0,3000);
+               $mWidth = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuWidth']?$this->mconf['menuWidth']:170), 0, 3000);
+               $mHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuHeight']?$this->mconf['menuHeight']:400), 0, 3000);
                $insertmColor= $this->mconf['menuBackColor'] ? 'BACKGROUND-COLOR: '.$this->mconf['menuBackColor'].'; layer-background-color: '.$this->mconf['menuBackColor'] : '';
                $insertBottomColor= $this->mconf['bottomBackColor'] ? 'BACKGROUND-COLOR: '.$this->mconf['bottomBackColor'].'; layer-background-color: '.$this->mconf['bottomBackColor'] : '';
                $menuOffset = t3lib_div::intExplode(',',$this->mconf['menuOffset'].',');
@@ -177,7 +177,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
 /*<![CDATA[*/
 <!--
 GFV_foldNumber='.$this->WMmenuItems.';          //How many toplinks do you have?
-GFV_foldTimer='.t3lib_utility_Math::forceIntegerInRange(($this->mconf['foldTimer']?$this->mconf['foldTimer']:40) ,1,3000).';          //The timeout in the animation, these are milliseconds.
+GFV_foldTimer='.t3lib_utility_Math::forceIntegerInRange(($this->mconf['foldTimer']?$this->mconf['foldTimer']:40), 1, 3000).';          //The timeout in the animation, these are milliseconds.
 GFV_foldSpeed='.t3lib_utility_Math::forceIntegerInRange($this->mconf['foldSpeed'],1,100).';           //How many steps in an animation?
 GFV_stayFolded='.($this->mconf['stayFolded'] ? 'true' : 'false').';      //Stay open when you click a new toplink?
 GFV_foldImg='.$this->WMimagesFlag.';             //Do you want images (if not set to 0 and remove the images from the body)?
index b8308c2..53aa7e7 100755 (executable)
@@ -3092,8 +3092,8 @@ class tx_impexp {
 
                                                                // Create diff-result:
                                                        $output[$fN] = $t3lib_diff_Obj->makeDiffDisplay(
-                                                               t3lib_BEfunc::getProcessedValue($table,$fN,!$inverseDiff ? $importRecord[$fN] : $databaseRecord[$fN] ,0,1,1),
-                                                               t3lib_BEfunc::getProcessedValue($table,$fN,!$inverseDiff ? $databaseRecord[$fN] : $importRecord[$fN] ,0,1,1)
+                                                               t3lib_BEfunc::getProcessedValue($table, $fN, !$inverseDiff ? $importRecord[$fN] : $databaseRecord[$fN], 0, 1, 1),
+                                                               t3lib_BEfunc::getProcessedValue($table, $fN, !$inverseDiff ? $databaseRecord[$fN] : $importRecord[$fN], 0, 1, 1)
                                                        );
                                                }
                                                unset($importRecord[$fN]);
index b01309a..5fcc1ce 100644 (file)
@@ -894,13 +894,13 @@ class Tx_IndexedSearch_Controller_SearchController extends Tx_Extbase_MVC_Contro
                                // case-sensitive. Defines the words, which will be
                                // operators between words
                                $operatorTranslateTable = array(
-                                       array('+' , 'AND'),
-                                       array('|' , 'OR'),
-                                       array('-' , 'AND NOT'),
+                                       array('+', 'AND'),
+                                       array('|', 'OR'),
+                                       array('-', 'AND NOT'),
                                                // english
-                                       // array('AND' , 'AND'),
-                                       // array('OR' , 'OR'),
-                                       // array('NOT' , 'AND NOT'),
+                                       // array('AND', 'AND'),
+                                       // array('OR', 'OR'),
+                                       // array('NOT', 'AND NOT'),
                                                // Add operators for various languages
                                                // Converts the operators to UTF-8 and lowercase
                                        array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8',$GLOBALS['TSFE']->csConvObj->utf8_encode(Tx_Extbase_Utility_Localization::translate('localizedOperandAnd', 'indexed_search'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'AND'),
index 9bf3aea..ccdb768 100755 (executable)
@@ -56,13 +56,13 @@ class tx_indexedsearch extends tslib_pibase {
        var $defaultResultNumber = 10;
 
        var $operator_translate_table = Array (         // case-sensitive. Defines the words, which will be operators between words
-               Array ('+' , 'AND'),
-               Array ('|' , 'OR'),
-               Array ('-' , 'AND NOT'),
+               Array ('+', 'AND'),
+               Array ('|', 'OR'),
+               Array ('-', 'AND NOT'),
                        // english
-#              Array ('AND' , 'AND'),
-#              Array ('OR' , 'OR'),
-#              Array ('NOT' , 'AND NOT'),
+#              Array ('AND', 'AND'),
+#              Array ('OR', 'OR'),
+#              Array ('NOT', 'AND NOT'),
        );
 
                // Internal variable
@@ -269,9 +269,9 @@ class tx_indexedsearch extends tslib_pibase {
 
                        // Add operators for various languages
                        // Converts the operators to UTF-8 and lowercase
-               $this->operator_translate_table[] = Array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8',$GLOBALS['TSFE']->csConvObj->utf8_encode($this->pi_getLL('local_operator_AND'), $GLOBALS['TSFE']->renderCharset),'toLower') , 'AND');
-               $this->operator_translate_table[] = Array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8',$GLOBALS['TSFE']->csConvObj->utf8_encode($this->pi_getLL('local_operator_OR'), $GLOBALS['TSFE']->renderCharset),'toLower') , 'OR');
-               $this->operator_translate_table[] = Array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8',$GLOBALS['TSFE']->csConvObj->utf8_encode($this->pi_getLL('local_operator_NOT'), $GLOBALS['TSFE']->renderCharset),'toLower') , 'AND NOT');
+               $this->operator_translate_table[] = Array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8', $GLOBALS['TSFE']->csConvObj->utf8_encode($this->pi_getLL('local_operator_AND'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'AND');
+               $this->operator_translate_table[] = Array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8', $GLOBALS['TSFE']->csConvObj->utf8_encode($this->pi_getLL('local_operator_OR'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'OR');
+               $this->operator_translate_table[] = Array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8', $GLOBALS['TSFE']->csConvObj->utf8_encode($this->pi_getLL('local_operator_NOT'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'AND NOT');
 
                        // This is the id of the site root. This value may be a commalist of integer (prepared for this)
                $this->wholeSiteIdList = intval($GLOBALS['TSFE']->config['rootLine'][0]['uid']);
index d31bb55..05b48a6 100644 (file)
@@ -86,8 +86,8 @@ class tx_saltedpasswords_salts_factoryTest extends tx_phpunit_testcase {
        public function objectInstanceImplementsInterface() {
                $this->assertTrue(method_exists($this->objectInstance, 'checkPassword'), 'Missing method checkPassword() from interface tx_saltedpasswords_salts.');
                $this->assertTrue(method_exists($this->objectInstance, 'isHashUpdateNeeded'), 'Missing method isHashUpdateNeeded() from interface tx_saltedpasswords_salts.');
-               $this->assertTrue(method_exists($this->objectInstance, 'isValidSalt') , 'Missing method isValidSalt() from interface tx_saltedpasswords_salts.');
-               $this->assertTrue(method_exists($this->objectInstance, 'isValidSaltedPW') , 'Missing method isValidSaltedPW() from interface tx_saltedpasswords_salts.');
+               $this->assertTrue(method_exists($this->objectInstance, 'isValidSalt'), 'Missing method isValidSalt() from interface tx_saltedpasswords_salts.');
+               $this->assertTrue(method_exists($this->objectInstance, 'isValidSaltedPW'), 'Missing method isValidSaltedPW() from interface tx_saltedpasswords_salts.');
                $this->assertTrue(method_exists($this->objectInstance, 'getHashedPassword'), 'Missing method getHashedPassword() from interface tx_saltedpasswords_salts.');
                $this->assertTrue(method_exists($this->objectInstance, 'getSaltLength'), 'Missing method getSaltLength() from interface tx_saltedpasswords_salts.');
        }
index 449171a..03a2451 100644 (file)
@@ -53,7 +53,7 @@ class tx_scheduler_CronCmd_NormalizeTest extends tx_phpunit_testcase {
                                '    return parent::normalizeMonthAndWeekdayField($expression, $isMonthField);' .
                                '  }' .
                                '  public static function normalizeIntegerField($expression, $lowerBound = 0, $upperBound = 59) {' .
-                               '    return parent::normalizeIntegerField($expression, $lowerBound , $upperBound);' .
+                               '    return parent::normalizeIntegerField($expression, $lowerBound, $upperBound);' .
                                '  }' .
                                '  public static function splitFields($cronCommand) {' .
                                '    return parent::splitFields($cronCommand);' .
index 1f60132..97f63c1 100644 (file)
@@ -142,12 +142,12 @@ class tslib_gmenu_foldout extends tslib_gmenu {
         * @return      string          Empty string! (Since $GLOBALS['TSFE']->divSection is set with the <div>-sections used in the menu)
         */
        function extProc_finish() {
-               $bHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['bottomHeight']?$this->mconf['bottomHeight']:100) ,0,3000);
+               $bHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['bottomHeight']?$this->mconf['bottomHeight']:100), 0, 3000);
                $bottomContent = $this->mconf['bottomContent'] ? $GLOBALS['TSFE']->cObj->cObjGetSingle($this->mconf['bottomContent'],$this->mconf['bottomContent.'], '/GMENU_FOLDOUT/.bottomContent') : '';
                $adjustTopHeights = intval($this->mconf['adjustItemsH']);
                $adjustSubHeights = intval($this->mconf['adjustSubItemsH']);
-               $mWidth = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuWidth']?$this->mconf['menuWidth']:170) ,0,3000);
-               $mHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuHeight']?$this->mconf['menuHeight']:400) ,0,3000);
+               $mWidth = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuWidth']?$this->mconf['menuWidth']:170), 0, 3000);
+               $mHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuHeight']?$this->mconf['menuHeight']:400), 0, 3000);
                $insertmColor= $this->mconf['menuBackColor'] ? 'BACKGROUND-COLOR: '.$this->mconf['menuBackColor'].'; layer-background-color: '.$this->mconf['menuBackColor'] : '';
                $insertBottomColor= $this->mconf['bottomBackColor'] ? 'BACKGROUND-COLOR: '.$this->mconf['bottomBackColor'].'; layer-background-color: '.$this->mconf['bottomBackColor'] : '';
                $menuOffset = t3lib_div::intExplode(',',$this->mconf['menuOffset'].',');
@@ -178,7 +178,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
 /*<![CDATA[*/
 <!--
 GFV_foldNumber='.$this->WMmenuItems.';          //How many toplinks do you have?
-GFV_foldTimer='.t3lib_utility_Math::forceIntegerInRange(($this->mconf['foldTimer']?$this->mconf['foldTimer']:40) ,1,3000).';          //The timeout in the animation, these are milliseconds.
+GFV_foldTimer='.t3lib_utility_Math::forceIntegerInRange(($this->mconf['foldTimer']?$this->mconf['foldTimer']:40), 1, 3000).';          //The timeout in the animation, these are milliseconds.
 GFV_foldSpeed='.t3lib_utility_Math::forceIntegerInRange($this->mconf['foldSpeed'],1,100).';           //How many steps in an animation?
 GFV_stayFolded='.($this->mconf['stayFolded'] ? 'true' : 'false').';      //Stay open when you click a new toplink?
 GFV_foldImg='.$this->WMimagesFlag.';             //Do you want images (if not set to 0 and remove the images from the body)?