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

[TASK] Fix a bunch of phpstan issues

parent 93d88200
No related branches found
Tags 6.0.0
1 merge request!35Feature upgrade to typo3 11
...@@ -26,6 +26,7 @@ namespace SGalinski\SgJobs\Controller; ...@@ -26,6 +26,7 @@ namespace SGalinski\SgJobs\Controller;
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/ ***************************************************************/
use Psr\Http\Message\ResponseInterface;
use SGalinski\ProjectBase\Domain\Repository\CountryRepository; use SGalinski\ProjectBase\Domain\Repository\CountryRepository;
use SGalinski\SgJobs\Domain\Model\Job; use SGalinski\SgJobs\Domain\Model\Job;
use SGalinski\SgJobs\Domain\Model\JobApplication; use SGalinski\SgJobs\Domain\Model\JobApplication;
...@@ -686,7 +687,7 @@ class JoblistController extends ActionController { ...@@ -686,7 +687,7 @@ class JoblistController extends ActionController {
/** /**
* If for any reason something goes wrong, delete the tmp upload folder * If for any reason something goes wrong, delete the tmp upload folder
* *
* @return void * @return mixed
* @throws NoSuchArgumentException * @throws NoSuchArgumentException
*/ */
public function errorAction() { public function errorAction() {
...@@ -695,7 +696,7 @@ class JoblistController extends ActionController { ...@@ -695,7 +696,7 @@ class JoblistController extends ActionController {
$this->deleteTmpFolder($folderName); $this->deleteTmpFolder($folderName);
} }
parent::errorAction(); return parent::errorAction();
} }
/** /**
......
...@@ -108,7 +108,7 @@ class Job extends AbstractEntity { ...@@ -108,7 +108,7 @@ class Job extends AbstractEntity {
/** /**
* @var \SGalinski\SgJobs\Domain\Model\Company $company * @var \SGalinski\SgJobs\Domain\Model\Company $company
*/ */
protected $company = ''; protected $company;
/** /**
* @var string $description * @var string $description
......
...@@ -87,8 +87,8 @@ class PluginRenderer implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHo ...@@ -87,8 +87,8 @@ class PluginRenderer implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHo
* Adapts the given $headerContent. * Adapts the given $headerContent.
* To be used in all plugin previews so the Header Contents appear similarly. * To be used in all plugin previews so the Header Contents appear similarly.
* *
* @param $headerContent * @param string $headerContent
* @param $row * @param array $row
*/ */
protected function adaptPluginHeaderContent(&$headerContent, $row): void { protected function adaptPluginHeaderContent(&$headerContent, $row): void {
$headerContent = '<h4>' . $this->getPluginNameForHeaderContent( $headerContent = '<h4>' . $this->getPluginNameForHeaderContent(
......
...@@ -31,7 +31,7 @@ final class QueryResultRawPaginator extends AbstractPaginator { ...@@ -31,7 +31,7 @@ final class QueryResultRawPaginator extends AbstractPaginator {
private $queryResult; private $queryResult;
/** /**
* @var QueryResultInterface * @var \TYPO3\CMS\Extbase\Persistence\QueryResultInterface|object[]
*/ */
private $paginatedQueryResult; private $paginatedQueryResult;
......
...@@ -55,7 +55,7 @@ class BackendService { ...@@ -55,7 +55,7 @@ class BackendService {
->from('pages') ->from('pages')
->where( ->where(
$queryBuilder->expr()->eq('is_siteroot', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)) $queryBuilder->expr()->eq('is_siteroot', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT))
)->execute()->fetchAll(); )->execute()->fetchAllAssociative();
foreach ($rows as $row) { foreach ($rows as $row) {
$pageInfo = BackendUtility::readPageAccess($row['uid'], $GLOBALS['BE_USER']->getPagePermsClause(1)); $pageInfo = BackendUtility::readPageAccess($row['uid'], $GLOBALS['BE_USER']->getPagePermsClause(1));
...@@ -129,7 +129,7 @@ class BackendService { ...@@ -129,7 +129,7 @@ class BackendService {
$rows = $queryBuilder->select('pid') $rows = $queryBuilder->select('pid')
->from('tx_sgjobs_domain_model_job') ->from('tx_sgjobs_domain_model_job')
->groupBy('pid') ->groupBy('pid')
->execute()->fetchAll(); ->execute()->fetchAllAssociative();
foreach ($rows as $row) { foreach ($rows as $row) {
$pageInfo = BackendUtility::readPageAccess($row['pid'], $GLOBALS['BE_USER']->getPagePermsClause(1)); $pageInfo = BackendUtility::readPageAccess($row['pid'], $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo) { if ($pageInfo) {
......
...@@ -60,7 +60,7 @@ class SitemapService { ...@@ -60,7 +60,7 @@ class SitemapService {
->execute(); ->execute();
$context = GeneralUtility::makeInstance(Context::class); $context = GeneralUtility::makeInstance(Context::class);
while ($row = $databaseResource->fetch()) { while ($row = $databaseResource->fetchAssociative()) {
try { try {
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($row['pid']); $site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($row['pid']);
if ($rootPageId > 0 && $site->getRootPageId() !== $rootPageId) { if ($rootPageId > 0 && $site->getRootPageId() !== $rootPageId) {
......
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