Navigation Menu

Skip to content

Commit

Permalink
[TASK] Fix phpstan checkFunctionArgumentTypes errors in ext:core Conf…
Browse files Browse the repository at this point in the history
…iguration

This patch fixes incompatible type usage in function arguments
and is preparatory work for introducing native type hints and
strict mode in all core files.

Releases: master, 10.4
Resolves: #92253
Change-Id: Ibbf42d227458a4480fffc5993034f8c36d9bae3e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65674
Tested-by: Jörg Bösche <typo3@joergboesche.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Sascha Egerer <sascha@sascha-egerer.de>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
  • Loading branch information
alexanderschnitzler authored and ervaude committed Sep 10, 2020
1 parent d6ebcd5 commit 8bd60bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -278,7 +278,7 @@ public function getDefaultConfigurationRawString(string $extensionKey): string
'EXT:' . $extensionKey . '/ext_conf_template.txt'
);
if (file_exists($extConfTemplateFileLocation)) {
$rawString = file_get_contents($extConfTemplateFileLocation);
$rawString = (string)file_get_contents($extConfTemplateFileLocation);
}
return $rawString;
}
Expand Down
Expand Up @@ -690,7 +690,7 @@ public function parseDataStructureByIdentifier(string $identifier): array
1478105826
);
}
$dataStructure = file_get_contents($file);
$dataStructure = (string)file_get_contents($file);
}

// Parse main structure
Expand Down Expand Up @@ -729,7 +729,7 @@ public function parseDataStructureByIdentifier(string $identifier): array
$file = GeneralUtility::getFileAbsFileName(trim($sheetStructure));
}
if ($file && @is_file($file)) {
$sheetStructure = GeneralUtility::xml2array(file_get_contents($file));
$sheetStructure = GeneralUtility::xml2array((string)file_get_contents($file));
}
}
$dataStructure['sheets'][$sheetName] = $sheetStructure;
Expand Down
Expand Up @@ -93,7 +93,7 @@ public function collect(array $rootLine): array
$extensionPath = ExtensionManagementUtility::extPath($includeTsConfigFileExtensionKey);
$includeTsConfigFileAndPath = PathUtility::getCanonicalPath($extensionPath . $includeTsConfigFilename);
if (strpos($includeTsConfigFileAndPath, $extensionPath) === 0 && file_exists($includeTsConfigFileAndPath)) {
$tsData['page_' . $page['uid'] . '_includes_' . $key] = file_get_contents($includeTsConfigFileAndPath);
$tsData['page_' . $page['uid'] . '_includes_' . $key] = (string)file_get_contents($includeTsConfigFileAndPath);
}
}
}
Expand Down

0 comments on commit 8bd60bc

Please sign in to comment.