[TASK] Fix CGL violations 35/37835/2
authorFrank Nägler <typo3@naegler.net>
Fri, 13 Mar 2015 21:03:54 +0000 (22:03 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 14 Mar 2015 13:33:36 +0000 (14:33 +0100)
Fix wrong case of TRUE, FALSE and NULL

Resolves: #65726
Releases: master
Change-Id: I2d6a96cb84c19f45538dfd76d96a9b85781e90d3
Reviewed-on: http://review.typo3.org/37835
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Utility/MathUtility.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.php
typo3/sysext/fluid/Classes/Service/AbstractGenerator.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
typo3/sysext/frontend/Tests/Functional/Page/PageRepositoryTest.php
typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php

index a8d9f15..7cebda7 100644 (file)
@@ -332,7 +332,7 @@ class HtmlParser {
                $nested = 0;
                reset($parts);
                // We skip the first element in foreach loop
-               $partsSliced = array_slice($parts, 1, null, true);
+               $partsSliced = array_slice($parts, 1, NULL, TRUE);
                foreach ($partsSliced as $v) {
                        $isEndTag = substr($content, $pointer, 2) == '</' ? 1 : 0;
                        $tagLen = strcspn(substr($content, $pointer), '>') + 1;
@@ -436,7 +436,7 @@ class HtmlParser {
                $newParts[] = $parts[0];
                reset($parts);
                // We skip the first element in foreach loop
-               $partsSliced = array_slice($parts, 1, null, true);
+               $partsSliced = array_slice($parts, 1, NULL, TRUE);
                foreach ($partsSliced as $v) {
                        $tagLen = strcspn(substr($content, $pointer), '>') + 1;
                        // Set tag:
@@ -701,7 +701,7 @@ class HtmlParser {
                $tokArr = explode('<', $content);
                $newContent[] = $this->processContent(current($tokArr), $hSC, $addConfig);
                // We skip the first element in foreach loop
-               $tokArrSliced = array_slice($tokArr, 1, null, true);
+               $tokArrSliced = array_slice($tokArr, 1, NULL, TRUE);
                $c = 1;
                $tagRegister = array();
                $tagStack = array();
@@ -1192,7 +1192,7 @@ class HtmlParser {
                $tagsArray = GeneralUtility::trimExplode(',', $tagList, TRUE);
                $contentParts = explode('&lt;', $content);
                // bypass the first
-               $contentPartsSliced = array_slice($contentParts, 1, null, true);
+               $contentPartsSliced = array_slice($contentParts, 1, NULL, TRUE);
                foreach ($contentPartsSliced as $k => $tok) {
                        $firstChar = $tok[0];
                        if (trim($firstChar) !== '') {
index 302c804..904c9ca 100644 (file)
@@ -122,7 +122,7 @@ class MathUtility {
                $err = '';
                $buffer = doubleval(current($reg[2]));
                // Advance pointer
-               $regSliced = array_slice($reg[2], 1, null, true);
+               $regSliced = array_slice($reg[2], 1, NULL, TRUE);
                foreach ($regSliced as $k => $v) {
                        $v = doubleval($v);
                        $sign = $reg[1][$k];
index 3504208..b946b4e 100644 (file)
@@ -19,7 +19,7 @@ $TCA['tx_blogexample_domain_model_blog'] = array (
                'tstamp' => 'tstamp',
                'crdate' => 'crdate',
                'versioningWS' => 2,
-               'versioning_followPages' => true,
+               'versioning_followPages' => TRUE,
                'origUid' => 't3_origuid',
                'languageField' => 'sys_language_uid',
                'transOrigPointerField' => 'l18n_parent',
@@ -44,7 +44,7 @@ $TCA['tx_blogexample_domain_model_post'] = array (
                'tstamp'   => 'tstamp',
                'crdate'   => 'crdate',
                'versioningWS' => 2,
-               'versioning_followPages' => true,
+               'versioning_followPages' => TRUE,
                'origUid' => 't3_origuid',
                'languageField' => 'sys_language_uid',
                'transOrigPointerField' => 'l18n_parent',
@@ -86,7 +86,7 @@ $TCA['tx_blogexample_domain_model_person'] = array (
                'tstamp' => 'tstamp',
                'crdate' => 'crdate',
                'versioningWS' => 2,
-               'versioning_followPages' => true,
+               'versioning_followPages' => TRUE,
                'origUid' => 't3_origuid',
                'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xml:LGL.prependAtCopy',
                'delete' => 'deleted',
index 53934cf..78270ce 100644 (file)
@@ -103,7 +103,7 @@ abstract class AbstractGenerator {
 
                $childNode = $domDocument->appendChild($domDocument->createElement($childNodeName));
                $childNode->appendChild($domDocument->createCDATASection($childNodeValue));
-               $childNodeTarget = $parentDomNode->ownerDocument->importNode($childNode, true);
+               $childNodeTarget = $parentDomNode->ownerDocument->importNode($childNode, TRUE);
                $parentDomNode->appendChild($childNodeTarget);
                return simplexml_import_dom($childNodeTarget);
        }
index 06e043d..833ead7 100644 (file)
@@ -156,8 +156,8 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $expected = array(
-                       'param1' => new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('param1', 'integer', 'P1 Stuff', TRUE, null, TRUE),
-                       'param2' => new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('param2', 'array', 'P2 Stuff', TRUE, null, TRUE),
+                       'param1' => new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('param1', 'integer', 'P1 Stuff', TRUE, NULL, TRUE),
+                       'param2' => new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('param2', 'array', 'P2 Stuff', TRUE, NULL, TRUE),
                        'param3' => new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('param3', 'string', 'P3 Stuff', FALSE, 'default', TRUE),
                );
 
index 1f79472..d0b12bf 100644 (file)
@@ -27,7 +27,7 @@ class PageRepositoryTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
                parent::setUp();
                $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
                $this->pagerepo = new PageRepository();
-               $this->pagerepo->init(false);
+               $this->pagerepo->init(FALSE);
        }
 
        /**
index af31e85..a3d7203 100644 (file)
@@ -958,7 +958,7 @@ class BrowseLinks extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                        ? $this->buttonConfig[$this->act . '.']['properties.']['title.']['readOnly']
                        : (isset($this->buttonConfig['properties.']['title.']['readOnly'])
                                ? $this->buttonConfig['properties.']['title.']['readOnly']
-                               : false);
+                               : FALSE);
                if ($readOnly) {
                        $currentClass = $this->curUrlInfo['act'] === $this->act ? $this->curUrlArray['class'] : '';
                        if (!$currentClass) {