Commit cdb016b3 authored by Ingo Fabbri's avatar Ingo Fabbri Committed by Christian Kuhn
Browse files

[TASK] Adjust QueryBuilder PHPDoc comments

Some methods have the wrong type declaration.
E.g. string instead of mixed.
Add type-hints for completeness.

Resolves: #96463
Releases: main, 11.5
Change-Id: I415e8fa572ecbe278aa8323fd206494d314c559f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72882

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent a6593bd9
......@@ -112,7 +112,7 @@ class QueryBuilder
/**
* @return QueryRestrictionContainerInterface
*/
public function getRestrictions()
public function getRestrictions(): QueryRestrictionContainerInterface
{
return $this->restrictionContainer;
}
......@@ -120,7 +120,7 @@ class QueryBuilder
/**
* @param QueryRestrictionContainerInterface $restrictionContainer
*/
public function setRestrictions(QueryRestrictionContainerInterface $restrictionContainer)
public function setRestrictions(QueryRestrictionContainerInterface $restrictionContainer): void
{
foreach ($this->additionalRestrictions as $restrictionClass => $options) {
if (empty($options['disabled'])) {
......@@ -145,7 +145,7 @@ class QueryBuilder
/**
* Re-apply default restrictions
*/
public function resetRestrictions()
public function resetRestrictions(): void
{
$this->setRestrictions(GeneralUtility::makeInstance(DefaultRestrictionContainer::class));
}
......@@ -771,7 +771,7 @@ class QueryBuilder
* Sets a new value for a column in a bulk update query.
*
* @param string $key The column to set.
* @param string $value The value, expression, placeholder, etc.
* @param mixed $value The value, expression, placeholder, etc.
* @param bool $createNamedParameter Automatically create a named parameter for the value
* @param int $type
*
......@@ -886,7 +886,7 @@ class QueryBuilder
* Sets a value for a column in an insert query.
*
* @param string $column The column into which the value should be inserted.
* @param string $value The value that should be inserted into the column.
* @param mixed $value The value that should be inserted into the column.
* @param bool $createNamedParameter Automatically create a named parameter for the value
*
* @return QueryBuilder This QueryBuilder instance.
......@@ -1041,7 +1041,7 @@ class QueryBuilder
*
* @return QueryBuilder This QueryBuilder instance.
*/
public function resetQueryPart($queryPartName): QueryBuilder
public function resetQueryPart(string $queryPartName): QueryBuilder
{
$this->concreteQueryBuilder->resetQueryPart($queryPartName);
......
Markdown is supported
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