Commit c2f47429 authored by Wouter Wolters's avatar Wouter Wolters Committed by Christian Kuhn
Browse files

[TASK] Code cleanup based on Psalm static analyser

Code cleanup based on the static analyser Psalm.
https://github.com/vimeo/psalm

Resolves: #79815
Releases: master
Change-Id: I67dd33a79564b81931515f210644e980f83d3b7b
Reviewed-on: https://review.typo3.org/51679


Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 5fea714d
......@@ -218,7 +218,7 @@ abstract class AbstractRecordList
* @param array $data Is the dataarray, record with the fields. Notice: These fields are (currently) NOT htmlspecialchar'ed before being wrapped in <td>-tags
* @param string $rowParams Is insert in the <tr>-tags. Must carry a ' ' as first character
* @param string $_ OBSOLETE - NOT USED ANYMORE. $lMargin is the leftMargin (int)
* @param string $_ OBSOLETE - NOT USED ANYMORE. Is the HTML <img>-tag for an alternative 'gfx/ol/line.gif'-icon (used in the top)
* @param string $_2 OBSOLETE - NOT USED ANYMORE. Is the HTML <img>-tag for an alternative 'gfx/ol/line.gif'-icon (used in the top)
* @param string $colType Defines the tag being used for the columns. Default is td.
* @return string HTML content for the table row
*/
......
......@@ -51,7 +51,7 @@ abstract class AbstractTree
}
/**
* @param \TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer $dataProvider
* @param \TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer $nodeRenderer
* @return void
*/
public function setNodeRenderer(\TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer $nodeRenderer)
......
......@@ -22,7 +22,6 @@ interface CollectionProcessorInterface
/**
* Post process the subelement collection of a specific node
*
* @abstract
* @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
* @param int $mountPoint
* @param int $level
......@@ -34,7 +33,6 @@ interface CollectionProcessorInterface
/**
* Post process the subelement collection of a specific node-filter combination
*
* @abstract
* @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
* @param string $searchFilter
* @param int $mountPoint
......@@ -46,7 +44,6 @@ interface CollectionProcessorInterface
/**
* Post process the collection of tree mounts
*
* @abstract
* @param string $searchFilter
* @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection $nodeCollection
* @return void
......
......@@ -31,7 +31,7 @@ abstract class AbstractTreeRenderer
/**
* Renders a node collection recursive or just a single instance
*
* @param \TYPO3\CMS\Backend\Tree\TreeNodeCollection $node
* @param \TYPO3\CMS\Backend\Tree\TreeNodeCollection $collection
* @param bool $recursive
* @return mixed
*/
......@@ -40,7 +40,7 @@ abstract class AbstractTreeRenderer
/**
* Renders an tree recursive or just a single instance
*
* @param \TYPO3\CMS\Backend\Tree\AbstractTree $node
* @param \TYPO3\CMS\Backend\Tree\AbstractTree $tree
* @param bool $recursive
* @return mixed
*/
......
......@@ -65,7 +65,7 @@ class BackendUser extends \TYPO3\CMS\Extbase\Domain\Model\BackendUser
}
/**
* @param string
* @param string $dbMountPoints
* @return void
*/
public function setDbMountPoints($dbMountPoints)
......
......@@ -51,6 +51,9 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
*/
public $join_pages = 0;
/**
* @var int
*/
public $defaultResultNumber = 10;
/**
......@@ -150,6 +153,9 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
*/
public $templateCode = '';
/**
* @var string
*/
public $hiddenFieldList = 'ext, type, defOp, media, order, group, lang, desc, results';
/**
......@@ -164,6 +170,9 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
*/
public $enableMetaphoneSearch = false;
/**
* @var bool
*/
public $storeMetaphoneInfoAsWords;
/**
......
......@@ -29,5 +29,5 @@ defined('TYPO3_MODE') or die();
]
]);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('pages', 3, 'url_scheme', 'after:cache_tags');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('pages', '3', 'url_scheme', 'after:cache_tags');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('pages', 'links', '--linebreak--, url_scheme;LLL:EXT:compatibility7/Resources/Private/Language/locallang_tca.xlf:pages.url_scheme_formlabel', 'after:target');
......@@ -29,7 +29,7 @@ interface TaggableBackendInterface extends \TYPO3\CMS\Core\Cache\Backend\Backend
/**
* Removes all cache entries of this cache which are tagged by any of the specified tags.
*
* @param string[] $tag List of tags
* @param string[] $tags List of tags
* @return void
* @api
*/
......
......@@ -244,7 +244,7 @@ class CacheManager implements SingletonInterface
/**
* Flushes entries tagged by any of the specified tags in all registered caches.
*
* @param string[] $tag Tags to search for
* @param string[] $tags Tags to search for
* @return void
* @api
*/
......
......@@ -117,7 +117,7 @@ interface FrontendInterface
/**
* Removes all cache entries of this cache which are tagged by any of the specified tags.
*
* @param string[] $tag List of tags
* @param string[] $tags List of tags
* @return void
* @api
*/
......
......@@ -105,8 +105,6 @@ class LoadedExtensionArrayElement implements \IteratorAggregate, \ArrayAccess, \
/**
* Register found files in extension array if extension was found
*
* @param void
*/
protected function initializeExtensionFiles()
{
......
......@@ -37,7 +37,7 @@ class LoadedExtensionsArray implements \Iterator, \ArrayAccess, \Serializable, \
protected $iteratorPosition;
/**
* @param \TYPO3\CMS\Core\Package\PackageManager
* @param \TYPO3\CMS\Core\Package\PackageManager $packageManager
*/
public function __construct(\TYPO3\CMS\Core\Package\PackageManager $packageManager)
{
......
......@@ -3275,7 +3275,7 @@ class DataHandler
*
* @param string $table Element table
* @param int $uid Element UID
* @param int $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
* @param int $destPid >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
* @param bool $first Is a flag set, if the record copied is NOT a 'slave' to another record copied. That is, if this record was asked to be copied in the cmd-array
* @param array $overrideValues Associative array with field/value pairs to override directly. Notice; Fields must exist in the table record and NOT be among excluded fields!
* @param string $excludeFields Commalist of fields to exclude from the copy process (might get default values)
......
......@@ -672,7 +672,7 @@ class DataMapProcessor
*
* @param string $tableName
* @param array $ids
* @param array|null $fieldNames
* @param array $fieldNames
* @return array
*/
protected function fetchDependentElements(string $tableName, array $ids, array $fieldNames)
......@@ -793,7 +793,7 @@ class DataMapProcessor
*
* @param DataMapItem $item
* @param string $scope
* @param null|bool $modified
* @param bool $modified
* @return string[]
*/
protected function getFieldNamesForItemScope(
......
......@@ -413,7 +413,7 @@ class Connection extends \Doctrine\DBAL\Connection
* are not required / and only the table name is passed through.
*
* @param string|null $tableName
* @param string|null $fieldName
* @param string $fieldName
* @return string
*/
public function lastInsertId($tableName = null, string $fieldName = 'uid'): string
......
......@@ -27,7 +27,7 @@ class PdoHelper
* be given as "field"(xyz) - no space between double quote and parenthesis -
* so they can be removed automatically.
*
* @param PDO $databaseHandle
* @param \PDO $databaseHandle
* @param string $pdoDriver
* @param string $pathAndFilename
* @return void
......
......@@ -39,7 +39,7 @@ interface PreProcessQueryHookInterface
*
* @param string $table Database table name
* @param array $fieldsValues Field values as key => value pairs
* @param string/array $noQuoteFields List/array of keys NOT to quote
* @param string|array $noQuoteFields List/array of keys NOT to quote
* @param \TYPO3\CMS\Core\Database\DatabaseConnection $parentObject
* @return void
*/
......@@ -53,7 +53,7 @@ interface PreProcessQueryHookInterface
* @param string $table Database table name
* @param array $fields Field names
* @param array $rows Table rows
* @param string/array $noQuoteFields List/array of keys NOT to quote
* @param string|array $noQuoteFields List/array of keys NOT to quote
* @param \TYPO3\CMS\Core\Database\DatabaseConnection $parentObject
* @return void
*/
......@@ -65,7 +65,7 @@ interface PreProcessQueryHookInterface
* @param string $table Database table name
* @param string $where WHERE clause
* @param array $fieldsValues Field values as key => value pairs
* @param string/array $noQuoteFields List/array of keys NOT to quote
* @param string|array $noQuoteFields List/array of keys NOT to quote
* @param \TYPO3\CMS\Core\Database\DatabaseConnection $parentObject
* @return void
*/
......
......@@ -24,7 +24,7 @@ class IntegerDataType extends AbstractDataType
/**
* IntegerDataType constructor.
*
* @param $length
* @param int $length
* @param array $options
*/
public function __construct(int $length, array $options)
......
......@@ -46,7 +46,7 @@ class TableDiff extends \Doctrine\DBAL\Schema\TableDiff
* @param array $tableOptions
* @return \TYPO3\CMS\Core\Database\Schema\TableDiff
*/
public function setTableOptions(array $tableOptions): self
public function setTableOptions(array $tableOptions): TableDiff
{
$this->tableOptions = $tableOptions;
......
......@@ -87,7 +87,7 @@ class ExtDirectApi
* Generates the API that is configured inside the ExtDirect configuration
* array "$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect']".
*
* @param array $filerNamespace Namespace that should be loaded like array('TYPO3.Backend')
* @param array $filterNamespaces Namespace that should be loaded like array('TYPO3.Backend')
* @return array Javascript API configuration
*/
protected function generateAPI(array $filterNamespaces)
......
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