Commit 2204ebd2 authored by Wouter Wolters's avatar Wouter Wolters Committed by Frank Nägler
Browse files

[TASK] Cleanup phpDoc to match CGL

* Use bool in @return
* Use int in @return
* Use bool in @param
* Use int in @param
* Remove extra tabs and spaces in @param

Resolves: #62506
Releases: master
Change-Id: I673888aa08855a1364150d0060d0f205fc1f83a2
Reviewed-on: http://review.typo3.org/33577

Reviewed-by: Stefan Froemken's avatarStefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken's avatarStefan Froemken <froemken@gmail.com>
Reviewed-by: default avatarFrank Nägler <typo3@naegler.net>
Tested-by: default avatarFrank Nägler <typo3@naegler.net>
parent e981c9b2
......@@ -86,7 +86,7 @@ class localPageTree extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
*
* @param int $doktype Doktype value to test
* @param int $uid uid to test.
* @return boolean
* @return bool
*/
public function ext_isLinkable($doktype, $uid) {
if ($uid && $doktype < 199) {
......@@ -141,7 +141,7 @@ class TBE_PageTree extends localPageTree {
*
* @param int $doktype Doktype value to test
* @param int $uid uid to test.
* @return boolean
* @return bool
*/
public function ext_isLinkable($doktype, $uid) {
return TRUE;
......@@ -209,7 +209,7 @@ class localFolderTree extends \TYPO3\CMS\Backend\Tree\View\FolderTreeView {
* Returns TRUE if the input "record" contains a folder which can be linked.
*
* @param \TYPO3\CMS\Core\Resource\Folder $folderObject Object with information about the folder element. Contains keys like title, uid, path, _title
* @return boolean TRUE is returned if the path is found in the web-part of the server and is NOT a recycler or temp folder
* @return bool TRUE is returned if the path is found in the web-part of the server and is NOT a recycler or temp folder
*/
public function ext_isLinkable(\TYPO3\CMS\Core\Resource\Folder $folderObject) {
if (strstr($folderObject->getIdentifier(), '_recycler_') || strstr($folderObject->getIdentifier(), '_temp_')) {
......@@ -258,7 +258,7 @@ class TBE_FolderTree extends localFolderTree {
* Returns TRUE if the input "record" contains a folder which can be linked.
*
* @param \TYPO3\CMS\Core\Resource\Folder $folderObject object with information about the folder element. Contains keys like title, uid, path, _title
* @return boolean TRUE is returned if the path is NOT a recycler or temp folder AND if ->ext_noTempRecyclerDirs is not set.
* @return bool TRUE is returned if the path is NOT a recycler or temp folder AND if ->ext_noTempRecyclerDirs is not set.
*/
public function ext_isLinkable($folderObject) {
if ($this->ext_noTempRecyclerDirs && (substr($folderObject->getIdentifier(), -7) == '_temp_/' || substr($folderObject->getIdentifier(), -11) == '_recycler_/')) {
......
......@@ -45,7 +45,7 @@ class newRecordLocalPageTree extends \TYPO3\CMS\Backend\Tree\View\PageTreeView {
* Here the branch is expanded if the current id matches the global id for the listing/new
*
* @param int $id The ID (page id) of the element
* @return boolean Returns TRUE if the IDs matches
* @return bool Returns TRUE if the IDs matches
*/
public function expandNext($id) {
return $id == $GLOBALS['SOBE']->id ? 1 : 0;
......
......@@ -15,7 +15,7 @@
/**
* Shows information about a database or file item
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require __DIR__ . '/init.php';
......
......@@ -49,7 +49,7 @@ class AjaxLoginHandler {
/**
* Checks if a user is logged in and the session is active.
*
* @return boolean
* @return bool
*/
protected function isAuthorizedBackendSession() {
return isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER'] instanceof \TYPO3\CMS\Core\Authentication\BackendUserAuthentication && isset($GLOBALS['BE_USER']->user['uid']);
......@@ -58,7 +58,7 @@ class AjaxLoginHandler {
/**
* Check whether the user was already authorized or not
*
* @return boolean
* @return bool
*/
protected function hasLoginBeenProcessed() {
$loginFormData = $GLOBALS['BE_USER']->getLoginFormData();
......
......@@ -1476,7 +1476,7 @@ class ClickMenu {
/**
* Returns TRUE if there should be writing to the div-layers (commands sent to clipboard MUST NOT write to div-layers)
*
* @return boolean
* @return bool
*/
public function isCMlayers() {
return !$this->CB;
......
......@@ -405,7 +405,7 @@ class Clipboard {
/**
* Returns true if the clipboard contains elements
*
* @return boolean
* @return bool
*/
public function hasElements() {
foreach ($this->clipData as $data) {
......@@ -831,7 +831,7 @@ class Clipboard {
/**
* Reports if the current pad has elements (does not check file/DB type OR if file/DBrecord exists or not. Only counting array)
*
* @return boolean TRUE if elements exist.
* @return bool TRUE if elements exist.
*/
public function isElements() {
return is_array($this->clipData[$this->current]['el']) && count($this->clipData[$this->current]['el']);
......
......@@ -135,7 +135,7 @@ class TranslationConfigurationProvider {
* Returns the table in which translations for input table is found.
*
* @param string $table The table name
* @return boolean
* @return bool
*/
public function getTranslationTable($table) {
return $this->isTranslationInOwnTable($table) ? $table : $this->foreignTranslationTable($table);
......@@ -145,7 +145,7 @@ class TranslationConfigurationProvider {
* Returns TRUE, if the input table has localization enabled and done so with records from the same table
*
* @param string $table The table name
* @return boolean
* @return bool
*/
public function isTranslationInOwnTable($table) {
return $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'];
......
......@@ -36,7 +36,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
* Evaluates a TypoScript condition given as input, eg. "[browser=net][...(other conditions)...]"
*
* @param string $string The condition to match against its criterias.
* @return boolean Whether the condition matched
* @return bool Whether the condition matched
* @see \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::parse()
*/
protected function evaluateCondition($string) {
......@@ -121,7 +121,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
* (i.e. in the Extension Manager, etc.) this function will return "0", so that
* the accordant conditions (e.g. PIDinRootline) will return "FALSE"
*
* @return integer The determined page id or otherwise 0
* @return int The determined page id or otherwise 0
*/
protected function determinePageId() {
$pageId = 0;
......@@ -167,7 +167,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
* @param string $table Name of the table
* @param int $id Id of the accordant record
* @param bool $ignoreTable Whether to ignore the page, if TRUE a positive
* @return integer Id of the page the record is persisted on
* @return int Id of the page the record is persisted on
*/
protected function getPageIdByRecord($table, $id, $ignoreTable = FALSE) {
$pageId = 0;
......@@ -188,7 +188,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
* This information is required for conditions in BE for PIDupinRootline.
*
* @param int $pid The pid the check for as parent page
* @return boolean TRUE if the is currently a new page record being edited with $pid as uid of the parent page
* @return bool TRUE if the is currently a new page record being edited with $pid as uid of the parent page
*/
protected function isNewPageWithPageId($pageId) {
if (isset($GLOBALS['SOBE']) && $GLOBALS['SOBE'] instanceof \TYPO3\CMS\Backend\Controller\EditDocumentController) {
......@@ -235,7 +235,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
/**
* Get the id of the current user.
*
* @return integer The id of the current user
* @return int The id of the current user
*/
protected function getUserId() {
$userId = $GLOBALS['BE_USER']->user['uid'];
......@@ -245,7 +245,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
/**
* Determines if a user is logged in.
*
* @return boolean Determines if a user is logged in
* @return bool Determines if a user is logged in
*/
protected function isUserLoggedIn() {
$userLoggedIn = FALSE;
......@@ -258,7 +258,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
/**
* Determines whether the current user is admin.
*
* @return boolean Whether the current user is admin
* @return bool Whether the current user is admin
*/
protected function isAdminUser() {
$isAdminUser = FALSE;
......
......@@ -83,7 +83,7 @@ abstract class AbstractContextMenuDataProvider {
*
* @param \TYPO3\CMS\Backend\Tree\TreeNode $node
* @param string $displayCondition
* @return boolean
* @return bool
*/
protected function evaluateDisplayCondition(\TYPO3\CMS\Backend\Tree\TreeNode $node, $displayCondition) {
if ($displayCondition === '') {
......
......@@ -209,7 +209,7 @@ class ContextMenuAction {
/**
* Returns TRUE if the action has child actions
*
* @return boolean
* @return bool
*/
public function hasChildActions() {
if ($this->childActions !== NULL) {
......
......@@ -657,7 +657,7 @@ class BackendController {
* Adds a javscript file to the backend after it has been checked that it exists
*
* @param string $javascriptFile Javascript file reference
* @return boolean TRUE if the javascript file was successfully added, FALSE otherwise
* @return bool TRUE if the javascript file was successfully added, FALSE otherwise
*/
public function addJavascriptFile($javascriptFile) {
$jsFileAdded = FALSE;
......@@ -687,7 +687,7 @@ class BackendController {
*
* @param string $cssFileName The css file's name with out the .css ending
* @param string $cssFile Css file reference
* @return boolean TRUE if the css file was added, FALSE otherwise
* @return bool TRUE if the css file was added, FALSE otherwise
*/
public function addCssFile($cssFileName, $cssFile) {
$cssFileAdded = FALSE;
......
......@@ -307,7 +307,7 @@ class EditDocumentController {
/**
* Detects, if a save command has been triggered.
*
* @return boolean TRUE, then save the document (data submitted)
* @return bool TRUE, then save the document (data submitted)
*/
public function doProcessData() {
$out = $this->doSave || isset($_POST['_savedok_x']) || isset($_POST['_saveandclosedok_x']) || isset($_POST['_savedokview_x']) || isset($_POST['_savedoknew_x']) || isset($_POST['_translation_savedok_x']) || isset($_POST['_translation_savedokclear_x']);
......
......@@ -67,7 +67,7 @@ class EditFileController {
/**
* Initialize script class
*
* @return void
* @return void
*/
protected function init() {
// Setting target, which must be a file reference to a file within the mounts.
......
......@@ -79,7 +79,7 @@ class FileUploadController {
/**
* Initialize
*
* @return void
* @return void
*/
protected function init() {
// Initialize GPvars:
......
......@@ -76,7 +76,7 @@ class FileSystemNavigationFrameController {
/**
* Initialiation of the script class
*
* @return void
* @return void
*/
protected function init() {
// Setting backPath
......
......@@ -542,7 +542,7 @@ class LoginController {
/**
* Checks if login credentials are currently submitted
*
* @return boolean
* @return bool
*/
protected function isLoginInProgress() {
$username = GeneralUtility::_GP('username');
......
......@@ -538,7 +538,7 @@ class NewRecordController {
*
* @param string $a First array element for compare
* @param string $b First array element for compare
* @return integer -1 for lower, 0 for equal, 1 for greater
* @return int -1 for lower, 0 for equal, 1 for greater
*/
public function sortNewRecordsByConfig($a, $b) {
if (count($this->newRecordSortList)) {
......@@ -597,7 +597,7 @@ class NewRecordController {
*
* @param array $pid_row Record for parent page.
* @param string $checkTable Table name to check
* @return boolean Returns TRUE if the tablename $checkTable is allowed to be created on the page with record $pid_row
* @return bool Returns TRUE if the tablename $checkTable is allowed to be created on the page with record $pid_row
*/
public function isTableAllowedForThisPage($pid_row, $checkTable) {
if (!is_array($pid_row)) {
......@@ -633,7 +633,7 @@ class NewRecordController {
* @param string $table Table name to test if in allowedTables
* @param array $allowedNewTables Array of new tables that are allowed.
* @param array $deniedNewTables Array of new tables that are not allowed.
* @return boolean Returns TRUE if a link for creating new records should be displayed for $table
* @return bool Returns TRUE if a link for creating new records should be displayed for $table
*/
public function showNewRecLink($table, array $allowedNewTables = array(), array $deniedNewTables = array()) {
......
......@@ -99,7 +99,7 @@ class PageTreeNavigationController {
/**
* Initialization of the class
*
* @return void
* @return void
*/
protected function init() {
// Setting backPath
......@@ -187,7 +187,7 @@ class PageTreeNavigationController {
/**
* Main function, rendering the browsable page tree
*
* @return void
* @return void
*/
public function main() {
// Produce browse-tree:
......
......@@ -115,7 +115,7 @@ class ColorpickerController {
/**
* Initialises the Class
*
* @return void
* @return void
*/
protected function init() {
// Setting GET vars (used in frameset script):
......@@ -186,7 +186,7 @@ class ColorpickerController {
/**
* Main Method, rendering either colorpicker or frameset depending on ->showPicker
*
* @return void
* @return void
*/
public function main() {
// Show frameset by default:
......@@ -407,7 +407,7 @@ class ColorpickerController {
* Determines whether submitted field change functions are valid
* and are coming from the system and not from an external abuse.
*
* @return boolean Whether the submitted field change functions are valid
* @return bool Whether the submitted field change functions are valid
*/
protected function areFieldChangeFunctionsValid() {
return $this->fieldChangeFunc && $this->fieldChangeFuncHash && $this->fieldChangeFuncHash === GeneralUtility::hmac($this->fieldChangeFunc);
......
......@@ -870,7 +870,7 @@ class FormsController {
*
* @param string $table Table name
* @param int $uid Record uid
* @return boolean
* @return bool
* @todo: Refactor to remove duplicate code (see TableController, RteController)
*/
protected function checkEditAccess($table, $uid) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment