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