[CLEANUP] Replace count with empty in multiple extensions
[Packages/TYPO3.CMS.git] / typo3 / sysext / css_styled_content / Classes / Controller / CssStyledContentController.php
index bb2723b..e4de3b6 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 namespace TYPO3\CMS\CssStyledContent\Controller;
 
-/**
+/*
  * This file is part of the TYPO3 CMS project.
  *
  * It is free software; you can redistribute it and/or modify it under
@@ -61,8 +61,10 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @param string $content Content input. Not used, ignore.
         * @param array $conf TypoScript configuration
         * @return string HTML output.
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, is done by default in pure TypoScript
         */
        public function render_bullets($content, $conf) {
+               GeneralUtility::logDeprecatedFunction();
                // Look for hook before running default code for function
                if ($hookObj = $this->hookRequest('render_bullets')) {
                        return $hookObj->render_bullets($content, $conf);
@@ -220,8 +222,10 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @param string $content Content input. Not used, ignore.
         * @param array $conf TypoScript configuration
         * @return string HTML output.
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, is done by default in pure TypoScript
         */
        public function render_uploads($content, $conf) {
+               GeneralUtility::logDeprecatedFunction();
                // Look for hook before running default code for function
                if ($hookObj = $this->hookRequest('render_uploads')) {
                        return $hookObj->render_uploads($content, $conf);
@@ -253,7 +257,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        // Explode into an array:
                        $fileArray = GeneralUtility::trimExplode(',', $fileList, TRUE);
                        // If there were files to list...:
-                       if (count($fileArray)) {
+                       if (!empty($fileArray)) {
                                // Get the descriptions for the files (if any):
                                $descriptions = GeneralUtility::trimExplode(LF, $this->cObj->data['imagecaption']);
                                // Get the titles for the files (if any)
@@ -312,14 +316,14 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                                }
                                                $conf['linkProc.']['altText'] = ($conf['linkProc.']['iconCObject.']['altText'] = $altText);
                                                $this->cObj->setCurrentVal($currentPath);
-                                               $GLOBALS['TSFE']->register['ICON_REL_PATH'] = $currentPath . $fileName;
-                                               $GLOBALS['TSFE']->register['filename'] = $filesData[$key]['filename'];
-                                               $GLOBALS['TSFE']->register['path'] = $filesData[$key]['path'];
-                                               $GLOBALS['TSFE']->register['fileSize'] = $filesData[$key]['filesize'];
-                                               $GLOBALS['TSFE']->register['fileExtension'] = $filesData[$key]['fileextension'];
-                                               $GLOBALS['TSFE']->register['description'] = $filesData[$key]['description'];
-                                               $GLOBALS['TSFE']->register['titleText'] = $filesData[$key]['titletext'];
-                                               $GLOBALS['TSFE']->register['altText'] = $filesData[$key]['alttext'];
+                                               $this->frontendController->register['ICON_REL_PATH'] = $currentPath . $fileName;
+                                               $this->frontendController->register['filename'] = $filesData[$key]['filename'];
+                                               $this->frontendController->register['path'] = $filesData[$key]['path'];
+                                               $this->frontendController->register['fileSize'] = $filesData[$key]['filesize'];
+                                               $this->frontendController->register['fileExtension'] = $filesData[$key]['fileextension'];
+                                               $this->frontendController->register['description'] = $filesData[$key]['description'];
+                                               $this->frontendController->register['titleText'] = $filesData[$key]['titletext'];
+                                               $this->frontendController->register['altText'] = $filesData[$key]['alttext'];
 
                                                $filesData[$key]['linkedFilenameParts'] = $this->beautifyFileLink(
                                                        explode('//**//', $this->cObj->filelink($fileName, $conf['linkProc.'])),
@@ -330,19 +334,19 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                        }
                                }
                                // optionSplit applied to conf to allow differnt settings per file
-                               $splitConf = $GLOBALS['TSFE']->tmpl->splitConfArray($conf, count($filesData));
+                               $splitConf = $this->frontendController->tmpl->splitConfArray($conf, count($filesData));
                                // Now, lets render the list!
                                $outputEntries = array();
                                foreach ($filesData as $key => $fileData) {
-                                       $GLOBALS['TSFE']->register['linkedIcon'] = $fileData['linkedFilenameParts'][0];
-                                       $GLOBALS['TSFE']->register['linkedLabel'] = $fileData['linkedFilenameParts'][1];
-                                       $GLOBALS['TSFE']->register['filename'] = $fileData['filename'];
-                                       $GLOBALS['TSFE']->register['path'] = $fileData['path'];
-                                       $GLOBALS['TSFE']->register['description'] = $fileData['description'];
-                                       $GLOBALS['TSFE']->register['fileSize'] = $fileData['filesize'];
-                                       $GLOBALS['TSFE']->register['fileExtension'] = $fileData['fileextension'];
-                                       $GLOBALS['TSFE']->register['titleText'] = $fileData['titletext'];
-                                       $GLOBALS['TSFE']->register['altText'] = $fileData['alttext'];
+                                       $this->frontendController->register['linkedIcon'] = $fileData['linkedFilenameParts'][0];
+                                       $this->frontendController->register['linkedLabel'] = $fileData['linkedFilenameParts'][1];
+                                       $this->frontendController->register['filename'] = $fileData['filename'];
+                                       $this->frontendController->register['path'] = $fileData['path'];
+                                       $this->frontendController->register['description'] = $fileData['description'];
+                                       $this->frontendController->register['fileSize'] = $fileData['filesize'];
+                                       $this->frontendController->register['fileExtension'] = $fileData['fileextension'];
+                                       $this->frontendController->register['titleText'] = $fileData['titletext'];
+                                       $this->frontendController->register['altText'] = $fileData['alttext'];
                                        $outputEntries[] = $this->cObj->cObjGetSingle($splitConf[$key]['itemRendering'], $splitConf[$key]['itemRendering.']);
                                }
                                if (isset($conf['outerWrap'])) {
@@ -440,7 +444,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
        }
 
        /**
-        * Rendering the IMGTEXT content element, called from TypoScript (tt_content.textpic.20)
+        * Rendering the text w/ image content element, called from TypoScript (tt_content.textpic.20)
         *
         * @param string $content Content input. Not used, ignore.
         * @param array $conf TypoScript configuration. See TSRef "IMGTEXT". This function aims to be compatible.
@@ -456,12 +460,12 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                $renderMethod = $this->cObj->stdWrap($conf['renderMethod'], $conf['renderMethod.']);
                // Render using the default IMGTEXT code (table-based)
                if (!$renderMethod || $renderMethod == 'table') {
-                       return $this->cObj->IMGTEXT($conf);
+                       return $this->cObj->cObjGetSingle('IMGTEXT', $conf);
                }
                $restoreRegisters = FALSE;
                if (isset($conf['preRenderRegisters.'])) {
                        $restoreRegisters = TRUE;
-                       $this->cObj->LOAD_REGISTER($conf['preRenderRegisters.'], 'LOAD_REGISTER');
+                       $this->cObj->cObjGetSingle('LOAD_REGISTER', $conf['preRenderRegisters.']);
                }
                // Specific configuration for the chosen rendering method
                if (is_array($conf['rendering.'][$renderMethod . '.'])) {
@@ -475,15 +479,15 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                if (!$imgList) {
                        // No images, that's easy
                        if ($restoreRegisters) {
-                               $this->cObj->LOAD_REGISTER(array(), 'RESTORE_REGISTER');
+                               $this->cObj->cObjGetSingle('RESTORE_REGISTER', array());
                        }
                        return $content;
                }
                $imgs = GeneralUtility::trimExplode(',', $imgList, TRUE);
-               if (count($imgs) === 0) {
+               if (empty($imgs)) {
                        // The imgList was not empty but did only contain empty values
                        if ($restoreRegisters) {
-                               $this->cObj->LOAD_REGISTER(array(), 'RESTORE_REGISTER');
+                               $this->cObj->cObjGetSingle('RESTORE_REGISTER', array());
                        }
                        return $content;
                }
@@ -504,8 +508,8 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        ? $this->cObj->stdWrap($conf['imgListContainsReferenceUids'], $conf['imgListContainsReferenceUids.'])
                        : $conf['imgListContainsReferenceUids']);
                // Use the calculated information (amount of images, if global caption is wanted) to choose a different rendering method for the images-block
-               $GLOBALS['TSFE']->register['imageCount'] = $imgCount;
-               $GLOBALS['TSFE']->register['renderGlobalCaption'] = $renderGlobalCaption;
+               $this->frontendController->register['imageCount'] = $imgCount;
+               $this->frontendController->register['renderGlobalCaption'] = $renderGlobalCaption;
                $fallbackRenderMethod = '';
                if ($conf['fallbackRendering']) {
                        $fallbackRenderMethod = $this->cObj->cObjGetSingle($conf['fallbackRendering'], $conf['fallbackRendering.']);
@@ -608,7 +612,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                // Fetches pictures
                $splitArr = array();
                $splitArr['imgObjNum'] = $conf['imgObjNum'];
-               $splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr, $imgCount);
+               $splitArr = $this->frontendController->tmpl->splitConfArray($splitArr, $imgCount);
                // Contains the width of every image row
                $imageRowsFinalWidths = array();
                // Array index of $imgsTag will be the same as in $imgs, but $imgsTag only contains the images that are actually shown
@@ -625,9 +629,9 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                $totalImagePath = $imgPath . $imgs[$imgKey];
                        }
                        // register IMG_NUM is kept for backwards compatibility
-                       $GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgKey;
-                       $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imgKey;
-                       $GLOBALS['TSFE']->register['ORIG_FILENAME'] = $totalImagePath;
+                       $this->frontendController->register['IMAGE_NUM'] = $imgKey;
+                       $this->frontendController->register['IMAGE_NUM_CURRENT'] = $imgKey;
+                       $this->frontendController->register['ORIG_FILENAME'] = $totalImagePath;
                        $this->cObj->data[$this->cObj->currentValKey] = $totalImagePath;
                        $imgObjNum = (int)$splitArr[$a]['imgObjNum'];
                        $imgConf = $conf[$imgObjNum . '.'];
@@ -676,13 +680,13 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        }
                        $titleInLink = $this->cObj->stdWrap($imgConf['titleInLink'], $imgConf['titleInLink.']);
                        $titleInLinkAndImg = $this->cObj->stdWrap($imgConf['titleInLinkAndImg'], $imgConf['titleInLinkAndImg.']);
-                       $oldATagParms = $GLOBALS['TSFE']->ATagParams;
+                       $oldATagParms = $this->frontendController->ATagParams;
                        if ($titleInLink) {
                                // Title in A-tag instead of IMG-tag
                                $titleText = trim($this->cObj->stdWrap($imgConf['titleText'], $imgConf['titleText.']));
                                if ($titleText) {
                                        // This will be used by the IMAGE call later:
-                                       $GLOBALS['TSFE']->ATagParams .= ' title="' . htmlspecialchars($titleText) . '"';
+                                       $this->frontendController->ATagParams .= ' title="' . htmlspecialchars($titleText) . '"';
                                }
                        }
 
@@ -742,25 +746,25 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                                $imgConf['emptyTitleHandling'] = 'removeAttr';
                                        }
                                }
-                               $imgsTag[$imgKey] = $this->cObj->IMAGE($imgConf);
+                               $imgsTag[$imgKey] = $this->cObj->cObjGetSingle('IMAGE', $imgConf);
                        } else {
                                // currentValKey !!!
-                               $imgsTag[$imgKey] = $this->cObj->IMAGE(array('file' => $totalImagePath));
+                               $imgsTag[$imgKey] = $this->cObj->cObjGetSingle('IMAGE', array('file' => $totalImagePath));
                        }
                        // Restore our ATagParams
-                       $GLOBALS['TSFE']->ATagParams = $oldATagParms;
+                       $this->frontendController->ATagParams = $oldATagParms;
                        // Store the original filepath
-                       $origImages[$imgKey] = $GLOBALS['TSFE']->lastImageInfo;
-                       if ($GLOBALS['TSFE']->lastImageInfo[0] == 0) {
+                       $origImages[$imgKey] = $this->frontendController->lastImageInfo;
+                       if ($this->frontendController->lastImageInfo[0] == 0) {
                                $imageRowsFinalWidths[(int)floor($a / $colCount)] += $this->cObj->data['imagewidth'];
                        } else {
-                               $imageRowsFinalWidths[(int)floor($a / $colCount)] += $GLOBALS['TSFE']->lastImageInfo[0];
+                               $imageRowsFinalWidths[(int)floor($a / $colCount)] += $this->frontendController->lastImageInfo[0];
                        }
                }
                // How much space will the image-block occupy?
                $imageBlockWidth = max($imageRowsFinalWidths) + $colspacing * ($colCount - 1) + $colCount * $border * ($borderSpace + $borderThickness) * 2;
-               $GLOBALS['TSFE']->register['rowwidth'] = $imageBlockWidth;
-               $GLOBALS['TSFE']->register['rowWidthPlusTextMargin'] = $imageBlockWidth + $textMargin;
+               $this->frontendController->register['rowwidth'] = $imageBlockWidth;
+               $this->frontendController->register['rowWidthPlusTextMargin'] = $imageBlockWidth + $textMargin;
                // noRows is in fact just one ROW, with the amount of columns specified, where the images are placed in.
                // noCols is just one COLUMN, each images placed side by side on each row
                $noRows = $this->cObj->stdWrap($conf['noRows'], $conf['noRows.']);
@@ -777,7 +781,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                if (!is_array($conf['editIcons.'])) {
                        $conf['editIcons.'] = array();
                }
-               $editIconsHTML = $conf['editIcons'] && $GLOBALS['TSFE']->beUserLogin ? $this->cObj->editIcons('', $conf['editIcons'], $conf['editIcons.']) : '';
+               $editIconsHTML = $conf['editIcons'] && $this->frontendController->beUserLogin ? $this->cObj->editIcons('', $conf['editIcons'], $conf['editIcons.']) : '';
                // If noRows, we need multiple imagecolumn wraps
                $imageWrapCols = 1;
                if ($noRows) {
@@ -798,13 +802,13 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        if (isset($conf['addClassesCol.'])) {
                                $addClassesCol = $this->cObj->stdWrap($addClassesCol, $conf['addClassesCol.']);
                        }
-                       $addClassesColConf = $GLOBALS['TSFE']->tmpl->splitConfArray(array('addClassesCol' => $addClassesCol), $colCount);
+                       $addClassesColConf = $this->frontendController->tmpl->splitConfArray(array('addClassesCol' => $addClassesCol), $colCount);
                        // Apply optionSplit to the list of classes that we want to add to each image
                        $addClassesImage = $conf['addClassesImage'];
                        if (isset($conf['addClassesImage.'])) {
                                $addClassesImage = $this->cObj->stdWrap($addClassesImage, $conf['addClassesImage.']);
                        }
-                       $addClassesImageConf = $GLOBALS['TSFE']->tmpl->splitConfArray(array('addClassesImage' => $addClassesImage), $imagesInColumns);
+                       $addClassesImageConf = $this->frontendController->tmpl->splitConfArray(array('addClassesImage' => $addClassesImage), $imagesInColumns);
                        $rows = array();
                        $currentImage = 0;
                        // Set the class for the caption (split or global)
@@ -829,7 +833,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                                // Set the key of the current image
                                                $imageKey = $currentImage + $imgStart;
                                                // Register IMAGE_NUM_CURRENT for the caption
-                                               $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imageKey;
+                                               $this->frontendController->register['IMAGE_NUM_CURRENT'] = $imageKey;
                                                $this->cObj->data[$this->cObj->currentValKey] = $origImages[$imageKey]['origFile'];
                                                if (MathUtility::canBeInterpretedAsInteger($imgs[$imageKey])) {
                                                        $this->initializeCurrentFileInContentObjectRenderer((int)$imgs[$imageKey], $imgListContainsReferenceUids);
@@ -932,7 +936,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        if (isset($conf['addClassesImage.'])) {
                                $addClassesImage = $this->cObj->stdWrap($addClassesImage, $conf['addClassesImage.']);
                        }
-                       $addClassesImageConf = $GLOBALS['TSFE']->tmpl->splitConfArray(array('addClassesImage' => $addClassesImage), $colCount);
+                       $addClassesImageConf = $this->frontendController->tmpl->splitConfArray(array('addClassesImage' => $addClassesImage), $colCount);
                        // Render the images
                        $images = '';
                        for ($c = 0; $c < $imageWrapCols; $c++) {
@@ -957,12 +961,12 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                        } else {
                                                $imageSpace = $origImages[$imgKey][0] + $border * ($borderSpace + $borderThickness) * 2;
                                        }
-                                       $GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgKey;
-                                       $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imgKey;
-                                       $GLOBALS['TSFE']->register['ORIG_FILENAME'] = $origImages[$imgKey]['origFile'];
-                                       $GLOBALS['TSFE']->register['imagewidth'] = $origImages[$imgKey][0];
-                                       $GLOBALS['TSFE']->register['imagespace'] = $imageSpace;
-                                       $GLOBALS['TSFE']->register['imageheight'] = $origImages[$imgKey][1];
+                                       $this->frontendController->register['IMAGE_NUM'] = $imgKey;
+                                       $this->frontendController->register['IMAGE_NUM_CURRENT'] = $imgKey;
+                                       $this->frontendController->register['ORIG_FILENAME'] = $origImages[$imgKey]['origFile'];
+                                       $this->frontendController->register['imagewidth'] = $origImages[$imgKey][0];
+                                       $this->frontendController->register['imagespace'] = $imageSpace;
+                                       $this->frontendController->register['imageheight'] = $origImages[$imgKey][1];
                                        if (MathUtility::canBeInterpretedAsInteger($imgs[$imgKey])) {
                                                $this->initializeCurrentFileInContentObjectRenderer(intval($imgs[$imgKey]), $imgListContainsReferenceUids);
                                        }
@@ -988,7 +992,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                        } else {
                                                $allRows .= $thisImage;
                                        }
-                                       $GLOBALS['TSFE']->register['columnwidth'] = $maxImageSpace + $tmpColspacing;
+                                       $this->frontendController->register['columnwidth'] = $maxImageSpace + $tmpColspacing;
                                        // Close this row at the end (colCount), or the last row at the final end
                                        if ($separateRows && $i + 1 == count($imgsTag)) {
                                                // Close the very last row with either normal configuration or lastRow stdWrap
@@ -1053,7 +1057,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                $imgWrapWidth = $imageBlockWidth;
                        }
                        // Wrap around the whole image block
-                       $GLOBALS['TSFE']->register['totalwidth'] = $imgWrapWidth;
+                       $this->frontendController->register['totalwidth'] = $imgWrapWidth;
                        if ($imgWrapWidth) {
                                $images = $this->cObj->stdWrap($images, $conf['imageStdWrap.']);
                        } else {
@@ -1076,7 +1080,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                );
 
                if ($restoreRegisters) {
-                       $this->cObj->LOAD_REGISTER(array(), 'RESTORE_REGISTER');
+                       $this->cObj->cObjGetSingle('RESTORE_REGISTER', array());
                }
 
                return $output;
@@ -1158,8 +1162,10 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @param bool $useSpaces
         * @param bool $cutFileExtension
         * @return array modified array with new link text
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, is done by default in pure TypoScript
         */
        protected function beautifyFileLink(array $links, $fileName, $useSpaces = FALSE, $cutFileExtension = FALSE) {
+               GeneralUtility::logDeprecatedFunction();
                $linkText = $fileName;
                if ($useSpaces) {
                        $linkText = str_replace('_', ' ', $linkText);
@@ -1189,7 +1195,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                // Create table attributes and classes array:
                $tableTagParams = ($classes = array());
                // Table attributes for all doctypes except HTML5
-               if ($GLOBALS['TSFE']->config['config']['doctype'] !== 'html5') {
+               if ($this->frontendController->config['config']['doctype'] !== 'html5') {
                        $tableTagParams['border'] = $border;
                        $tableTagParams['cellspacing'] = $cellSpacing;
                        $tableTagParams['cellpadding'] = $cellPadding;
@@ -1245,11 +1251,11 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @return void
         */
        protected function addPageStyle($selector, $declaration) {
-               if (!isset($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'])) {
-                       $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'] = array();
+               if (!isset($this->frontendController->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'])) {
+                       $this->frontendController->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'] = array();
                }
-               if (!isset($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'][$selector])) {
-                       $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'][$selector] = TAB . $selector . ' { ' . $declaration . ' }';
+               if (!isset($this->frontendController->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'][$selector])) {
+                       $this->frontendController->tmpl->setup['plugin.']['tx_cssstyledcontent.']['_CSS_PAGE_STYLE'][$selector] = TAB . $selector . ' { ' . $declaration . ' }';
                }
        }
 
@@ -1257,7 +1263,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * Returns an object reference to the hook object if any
         *
         * @param string $functionName Name of the function you want to call / hook key
-        * @return object Hook object, if any. Otherwise NULL.
+        * @return object|NULL Hook object, if any. Otherwise NULL.
         */
        public function hookRequest($functionName) {
                // Hook: menuConfig_preProcessModMenu
@@ -1278,4 +1284,5 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
        protected function getResourceFactory() {
                return \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance();
        }
+
 }