Commit 5430c003 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] Fix remaining php stan issue

parent 800162ba
......@@ -70,7 +70,7 @@ class PluginController extends AbstractPlugin {
*
* @var AbstractBaseDataProvider
*/
protected $dataProvider = NULL;
protected $dataProvider;
/**
* Plugin configuration
......@@ -91,7 +91,7 @@ class PluginController extends AbstractPlugin {
$tsfe = $GLOBALS['TSFE'];
if ($this->pluginConfiguration['renderer'] === 'TypoScript' || !$this->pluginConfiguration['renderer']) {
/** @var $renderer TypoScriptView */
/** @var TypoScriptView $renderer */
$renderer = GeneralUtility::makeInstance(TypoScriptView::class);
$renderer->addPluginConfiguration($this->pluginConfiguration, $tabId);
$renderer->injectPageRenderer(GeneralUtility::makeInstance(PageRenderer::class));
......@@ -100,7 +100,7 @@ class PluginController extends AbstractPlugin {
$records = $repository->getRecords();
$renderer->addInlineJavaScriptCode($records, $this->pluginConfiguration['mode'], $tabId);
} elseif ($this->pluginConfiguration['renderer'] === 'Fluid') {
/** @var $renderer FluidView */
/** @var FluidView $renderer */
$renderer = GeneralUtility::makeInstance(FluidView::class, $this->pluginConfiguration);
}
......@@ -113,7 +113,7 @@ class PluginController extends AbstractPlugin {
* @return ConfigurationService
*/
protected function getConfigurationManager() {
/** @var $configurationManager ConfigurationService */
/** @var ConfigurationService $configurationManager */
$configurationManager = GeneralUtility::makeInstance(ConfigurationService::class);
$configurationManager->injectControllerContext($this);
......@@ -126,7 +126,7 @@ class PluginController extends AbstractPlugin {
* @return TabRepository
*/
protected function getTabRepository() {
/** @var $repository TabRepository */
/** @var TabRepository $repository */
$repository = GeneralUtility::makeInstance(TabRepository::class);
$repository->injectContentObject($this->cObj);
$repository->injectPluginConfiguration($this->pluginConfiguration);
......
......@@ -62,7 +62,7 @@ abstract class AbstractDataBaseDataProvider extends AbstractBaseDataProvider {
->from($this->table)
->where(
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
)->execute()->fetch();
)->execute()->fetchAssociative();
/** @var TypoScriptFrontendController $typoscriptController */
$typoscriptController = $GLOBALS['TSFE'];
......
......@@ -67,7 +67,7 @@ class PagesDataProvider extends AbstractDataBaseDataProvider {
}
}
$contentElements = $queryBuilder->execute()->fetchAll();
$contentElements = $queryBuilder->execute()->fetchAllAssociative();
return \array_column($contentElements, 'uid');
}
}
......@@ -43,7 +43,7 @@ class TabRepository {
/**
* @var ContentObjectRenderer
*/
protected $contentObject = NULL;
protected $contentObject;
/**
* Injects an instance of the content object
......@@ -155,7 +155,7 @@ class TabRepository {
));
}
/** @var $tabElement Tab */
/** @var Tab $tabElement */
$tabElement = GeneralUtility::makeInstance(Tab::class, htmlspecialchars($title), $recordId);
$tabElement->setLink($dataProvider->getLinkData($recordId));
$tabElement->setContent($dataProvider->getTabContent($recordId));
......
......@@ -67,10 +67,10 @@ class PluginRenderer implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHo
* 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 {
protected function adaptPluginHeaderContent(string &$headerContent, array $row): void {
$headerContent = '<h4>' . $this->getPluginNameForHeaderContent(
(int) $row['pid'],
$row['list_type']
......
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