Skip to content
Snippets Groups Projects
Commit d715b775 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] More phpstan errors fixed

parent 9a8d1b91
No related branches found
No related tags found
1 merge request!38Feature upgrade to typo3 11
......@@ -107,8 +107,8 @@ class PluginRenderer implements PageLayoutViewDrawItemHookInterface {
* Adapts the given $headerContent.
* To be used in all plugin previews so the Header Contents appear similarly.
*
* @param $headerContent
* @param $row
* @param string $headerContent
* @param array $row
*/
protected function adaptPluginHeaderContent(&$headerContent, $row): void {
$headerContent = '<h4>' . $this->getPluginNameForHeaderContent(
......
......@@ -40,7 +40,7 @@ class HeaderMetaDataService {
* @return void
*/
public static function addOgImageToHeader($path): void {
/** @var $typoScriptController TypoScriptFrontendController */
/** @var TypoScriptFrontendController $typoScriptController */
$typoScriptController = $GLOBALS['TSFE'];
$typoScriptController->page['og_image_path_by_extension'] = $path;
}
......@@ -52,7 +52,7 @@ class HeaderMetaDataService {
* @return void
*/
public static function addOgImageObjectToHeader($file): void {
/** @var $typoScriptController TypoScriptFrontendController */
/** @var TypoScriptFrontendController $typoScriptController */
$typoScriptController = $GLOBALS['TSFE'];
$typoScriptController->page['og_image_path_by_extension'] = $file;
}
......
......@@ -78,13 +78,13 @@ class TcaProvider implements SingletonInterface {
->where(
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($pagesIdentity, \PDO::PARAM_INT))
)
->execute()->fetch();
->execute()->fetchAssociative();
$workspaceOriginalId = (int) $row['t3ver_oid'];
if ($workspaceOriginalId > 0) {
$row = $queryBuilder->where(
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($workspaceOriginalId, \PDO::PARAM_INT))
)->execute()->fetch();
)->execute()->fetchAssociative();
}
// only articles
......
......@@ -75,7 +75,7 @@ class MigrateSchedulerTasks implements UpgradeWizardInterface {
->from('tx_scheduler_task')
->where(
$queryBuilder->expr()->eq('disable', 0)
)->execute()->fetchAll();
)->execute()->fetchAllAssociative();
foreach ($tasks as $_task) {
$task = unserialize($_task['serialized_task_object'], [\__PHP_Incomplete_Class::class]);
$taskVars = $this->cleanArrayKeys((array)$task);
......@@ -131,7 +131,7 @@ class MigrateSchedulerTasks implements UpgradeWizardInterface {
->from('tx_scheduler_task')
->where(
$queryBuilder->expr()->eq('disable', 0)
)->execute()->fetchAll();
)->execute()->fetchAllAssociative();
foreach ($tasks as $_task) {
$task = unserialize($_task['serialized_task_object'], [\__PHP_Incomplete_Class::class]);
$taskVars = $this->cleanArrayKeys((array)$task);
......
......@@ -86,6 +86,8 @@ class UpdateAuthors implements UpgradeWizardInterface {
/**
* @return bool
* @throws \Doctrine\DBAL\DBALException
* @throws \Doctrine\DBAL\Driver\Exception
*/
public function executeUpdate(): bool {
$newsQueryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
......@@ -98,7 +100,7 @@ class UpdateAuthors implements UpgradeWizardInterface {
$newsQueryBuilder->expr()->neq('author', $newsQueryBuilder->quote(''))
)
)
->execute()->fetchAll();
->execute()->fetchAllAssociative();
if (count($newsEntries) <= 0) {
return TRUE;
}
......@@ -122,7 +124,7 @@ class UpdateAuthors implements UpgradeWizardInterface {
)
)
->setMaxResults(1)
->execute()->fetchAll();
->execute()->fetchAllAssociative();
if (!$author) {
$authorQueryBuilder->insert('tx_sgnews_domain_model_author')
->values([
......
......@@ -175,7 +175,7 @@ class BackendNewsUtility {
$queryBuilder->expr()->in('uid', $queryBuilder->createNamedParameter(explode(',', $childPids), Connection::PARAM_INT_ARRAY))
)
)
->execute()->fetchAll();
->execute()->fetchAllAssociative();
$categories = [];
foreach ($result as $page) {
$categoryPageInfo = BackendUtility::readPageAccess(
......@@ -433,7 +433,7 @@ class BackendNewsUtility {
$authorQueryBuilder->expr()->like('author.name', $authorSearchParameter),
$authorQueryBuilder->expr()->like('author.email', $authorSearchParameter)
)
)->execute()->fetchAll();
)->execute()->fetchAllAssociative();
if (count($authors) > 0) {
foreach (array_column($authors, 'uid') as $authorUid) {
......@@ -482,7 +482,7 @@ class BackendNewsUtility {
$languageRows = $queryBuilder->select('uid', 'title', 'flag')
->from('sys_language')
->orderBy('sorting')
->execute()->fetchAll();
->execute()->fetchAllAssociative();
if ($languageRows) {
/** @var BackendUserAuthentication $backendUser */
$backendUser = $GLOBALS['BE_USER'];
......@@ -567,7 +567,7 @@ class BackendNewsUtility {
}
}
return $queryBuilder->execute()->fetchAll();
return $queryBuilder->execute()->fetchAllAssociative();
}
return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment