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

[TASK] Fix some DB + type annotation

parent 5d9a11bf
No related branches found
No related tags found
1 merge request!35Feature upgrade to typo3 11
......@@ -111,7 +111,7 @@ class SitemapService {
->execute();
$visibleRows = [];
$rows = $databaseResource->fetchAll();
$rows = $databaseResource->fetchAllAssociative();
$pageRepository = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Domain\Repository\PageRepository::class);
$isLanguageVisibilityLoaded = ExtensionManagementUtility::isLoaded('languagevisibility');
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
......
......@@ -64,10 +64,10 @@ class DepartmentUpdateWizard implements UpgradeWizardInterface {
/**
* Check if the job database table has a field with the given name in it
*
* @param $fieldName
* @param string $fieldName
* @return bool
*/
protected function hasField($fieldName): bool {
protected function hasField(string $fieldName): bool {
$connection = $this->getDatabaseConnection();
$tableColumns = $connection->getSchemaManager()->listTableColumns('tx_sgjobs_domain_model_job');
if (\array_key_exists($fieldName, $tableColumns)) {
......@@ -118,7 +118,7 @@ class DepartmentUpdateWizard implements UpgradeWizardInterface {
$jobs = $queryBuilder->select('uid', 'pid', 'sys_language_uid', $field)
->from('tx_sgjobs_domain_model_job')
->execute()
->fetchAll();
->fetchAllAssociative();
$newDepartments = [];
if (\count($jobs) > 0) {
......@@ -150,7 +150,7 @@ class DepartmentUpdateWizard implements UpgradeWizardInterface {
$departments = $queryBuilder->select('uid', 'pid', 'sys_language_uid', 'title')
->from('tx_sgjobs_domain_model_department')
->execute()
->fetchAll();
->fetchAllAssociative();
$identifiedDepartments = [];
foreach ($departments as $department) {
......
......@@ -45,7 +45,7 @@ class SetViewHelper extends AbstractViewHelper {
/**
* Set (override) the variable in $name.
*
* @return void
* @return NULL
* @throws \TYPO3Fluid\Fluid\Core\Exception
*/
public function render() {
......
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