Add PHPStan

In order to static analyze code and prevent bugs when changing code.
Fix issues in most of the files.
This commit is contained in:
Daniel Siepmann 2021-09-07 09:52:14 +02:00
parent ebb668221e
commit f618536ff9
21 changed files with 542 additions and 822 deletions

View file

@ -42,3 +42,12 @@ test:cgl:
script:
- composer install --prefer-dist --no-progress
- ./vendor/bin/ecs check --no-progress-bar --clear-cache --fix
# Disabled due to high memory consumption in CI
# test:phpstan:
# image: php:7.3-alpine
# stage: test
# before_script:
# script:
# - composer install --prefer-dist --no-progress
# - ./vendor/bin/phpstan

View file

@ -13,7 +13,7 @@ use Wrm\Events\Service\DestinationDataImportService;
class DestinationDataImportCommand extends Command
{
public function configure()
public function configure(): void
{
$this->setDescription('Import Destination Data Events');
$this->setHelp('Destination Data Events are imported');

View file

@ -12,7 +12,7 @@ use Wrm\Events\Service\CleanupService;
class RemoveAllCommand extends Command
{
public function configure()
public function configure(): void
{
$this->setDescription('Remove all event data');
$this->setHelp('All events and associated data will be removed.');

View file

@ -12,7 +12,7 @@ use Wrm\Events\Service\CleanupService;
class RemovePastCommand extends Command
{
public function configure()
public function configure(): void
{
$this->setDescription('Remove past events');
$this->setHelp('Past dates are removed, together with events that do not have any left dates.');
@ -22,8 +22,9 @@ class RemovePastCommand extends Command
{
Bootstrap::initializeBackendAuthentication();
return GeneralUtility::makeInstance(ObjectManager::class)
GeneralUtility::makeInstance(ObjectManager::class)
->get(CleanupService::class)
->deletePastData();
return 0;
}
}

View file

@ -66,15 +66,12 @@ class DateController extends AbstractController
/**
* @param DataProcessingForModels $dataProcessing
*/
public function injectDataProcessingForModels(DataProcessingForModels $dataProcessing)
public function injectDataProcessingForModels(DataProcessingForModels $dataProcessing): void
{
$this->dataProcessing = $dataProcessing;
}
/**
* Action initializer
*/
protected function initializeAction()
protected function initializeAction(): void
{
$this->dataProcessing->setConfigurationManager($this->configurationManager);
$this->pluginSettings = $this->configurationManager->getConfiguration(
@ -82,12 +79,7 @@ class DateController extends AbstractController
);
}
/**
* action list
*
* @return void
*/
public function listAction()
public function listAction(): void
{
if (
($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '')
@ -103,10 +95,7 @@ class DateController extends AbstractController
$this->view->assign('dates', $this->dateRepository->findByDemand($demand));
}
/**
* @return void
*/
public function searchAction()
public function searchAction(): void
{
$arguments = GeneralUtility::_GET('tx_events_datelist') ?? [];
if (isset($arguments['events_search'])) {
@ -126,33 +115,20 @@ class DateController extends AbstractController
]);
}
/**
* action teaser
*
* @return void
*/
public function teaserAction()
public function teaserAction(): void
{
$dates = $this->dateRepository->findByUids($this->settings['eventUids']);
$this->view->assign('dates', $dates);
}
/**
* action show
*
* @Extbase\IgnoreValidation("date")
*
* @param \Wrm\Events\Domain\Model\Date $date
* @return void
*/
public function showAction(Date $date)
public function showAction(Date $date): void
{
$this->view->assign('date', $date);
}
/**
* @return DateDemand
*/
protected function createDemandFromSettings(): DateDemand
{
$demand = $this->objectManager->get(DateDemand::class);
@ -164,9 +140,13 @@ class DateController extends AbstractController
$demand->setIncludeSubCategories((bool)$this->settings['includeSubcategories']);
$demand->setSortBy((string)$this->settings['sortByDate']);
$demand->setSortOrder((string)$this->settings['sortOrder']);
$demand->setHighlight((int)$this->settings['highlight']);
$demand->setStart((string)$this->settings['start'] ?? '');
$demand->setEnd((string)$this->settings['end'] ?? '');
$demand->setHighlight((bool)$this->settings['highlight']);
if (!empty($this->settings['start'])) {
$demand->setStart(strtotime($this->settings['start'] . ' 00:00') ?: null);
}
if (!empty($this->settings['end'])) {
$demand->setEnd(strtotime($this->settings['end'] . ' 00:00') ?: null);
}
if (!empty($this->settings['limit'])) {
$demand->setLimit($this->settings['limit']);
@ -175,9 +155,6 @@ class DateController extends AbstractController
return $demand;
}
/**
* @return DateDemand
*/
protected function createDemandFromSearch(): DateDemand
{
$arguments = $this->request->getArguments() ?? [];

View file

@ -36,7 +36,7 @@ class EventController extends AbstractController
$this->demandFactory = $demandFactory;
}
protected function initializeAction()
protected function initializeAction(): void
{
$this->dataProcessing->setConfigurationManager($this->configurationManager);
}

View file

@ -44,7 +44,7 @@ class DateDemand
/**
* @var bool
*/
protected $highlight = 0;
protected $highlight = false;
/**
* @var string
@ -52,14 +52,14 @@ class DateDemand
protected $limit = '';
/**
* @var string
* @var int|null
*/
protected $start = '';
protected $start = null;
/**
* @var string
* @var int|null
*/
protected $end = '';
protected $end = null;
/**
* @var string
@ -78,7 +78,7 @@ class DateDemand
/**
* @var bool
*/
protected $considerDate = 0;
protected $considerDate = false;
public static function createFromRequestValues(
array $submittedValues,
@ -95,13 +95,13 @@ class DateDemand
}
if (isset($submittedValues['start']) && $submittedValues['start'] !== '') {
$instance->setStart(strtotime($submittedValues['start'] . ' 00:00'));
$instance->setStart(strtotime($submittedValues['start'] . ' 00:00') ?: null);
}
if (isset($submittedValues['end']) && $submittedValues['end'] !== '') {
$instance->setEnd(strtotime($submittedValues['end'] . ' 23:59'));
$instance->setEnd(strtotime($submittedValues['end'] . ' 23:59') ?: null);
}
if (isset($submittedValues['considerDate']) && $submittedValues['considerDate'] !== '') {
$instance->setConsiderDate(strtotime($submittedValues['considerDate']));
$instance->setConsiderDate((bool)$submittedValues['considerDate']);
}
if (is_array($submittedValues['userCategories'])) {
@ -118,41 +118,26 @@ class DateDemand
return $instance;
}
/**
* @return string
*/
public function getSortBy(): string
{
return $this->sortBy;
}
/**
* @param string $sortBy
*/
public function setSortBy(string $sortBy)
public function setSortBy(string $sortBy): void
{
$this->sortBy = $sortBy;
}
/**
* @return string
*/
public function getSortOrder(): string
{
return $this->sortOrder;
}
/**
* @param string $sortOrder
*/
public function setSortOrder(string $sortOrder)
public function setSortOrder(string $sortOrder): void
{
$this->sortOrder = $sortOrder;
}
/**
* @return string
*/
public function getCategories(): string
{
return $this->categories;
@ -163,105 +148,66 @@ class DateDemand
return $this->userCategories;
}
/**
* @param string $categories
*/
public function setCategories(string $categories)
public function setCategories(string $categories): void
{
$this->categories = $categories;
}
/**
* @return bool
*/
public function getIncludeSubCategories(): bool
{
return $this->includeSubCategories;
}
/**
* @param bool $includeSubCategories
*/
public function setIncludeSubCategories(bool $includeSubCategories)
public function setIncludeSubCategories(bool $includeSubCategories): void
{
$this->includeSubCategories = $includeSubCategories;
}
/**
* @return string
*/
public function getCategoryCombination(): string
{
return $this->categoryCombination;
}
/**
* @param string $categoryCombination
*/
public function setCategoryCombination(string $categoryCombination)
public function setCategoryCombination(string $categoryCombination): void
{
$this->categoryCombination = $categoryCombination;
}
/**
* @return string
*/
public function getRegion(): string
{
return $this->region;
}
/**
* @param \Wrm\DdEvents\Domain\Model\Region $region
*/
public function setRegion(string $region): void
{
$this->region = $region;
}
/**
* @return bool
*/
public function getHighlight(): bool
{
return $this->highlight;
}
/**
* @param bool $highlight
*/
public function setHighlight(bool $highlight): void
{
$this->highlight = $highlight;
}
/**
* @return string
*/
public function getLimit(): string
{
return $this->limit;
}
/**
* @param string $limit
*/
public function setLimit(string $limit): void
{
$this->limit = $limit;
}
/**
* @return string
*/
public function getSearchword(): string
{
return $this->searchword;
}
/**
* @param string $searchword
*/
public function setSearchword(string $searchword): void
{
$this->searchword = $searchword;
@ -300,50 +246,32 @@ class DateDemand
return $this->synonyms[$searchWord] ?? [];
}
/**
* @return string
*/
public function getStart(): string
public function getStart(): ?int
{
return $this->start;
}
/**
* @param string $start
*/
public function setStart(string $start): void
public function setStart(?int $start): void
{
$this->start = $start;
}
/**
* @return string
*/
public function getEnd(): string
public function getEnd(): ?int
{
return $this->end;
}
/**
* @param string $end
*/
public function setEnd(string $end): void
public function setEnd(?int $end): void
{
$this->end = $end;
}
/**
* @return bool
*/
public function getConsiderDate(): bool
{
return $this->considerDate;
}
/**
* @param bool $considerDate
*/
public function setConsiderDate(string $considerDate): void
public function setConsiderDate(bool $considerDate): void
{
$this->considerDate = $considerDate;
}

View file

@ -2,6 +2,8 @@
namespace Wrm\Events\Domain\Model\Dto;
use Wrm\Events\Domain\Model\Region;
class EventDemand
{
/**
@ -49,145 +51,91 @@ class EventDemand
*/
protected $recordUids = [];
/**
* @return string
*/
public function getSortBy(): string
{
return $this->sortBy;
}
/**
* @param string $sortBy
*/
public function setSortBy(string $sortBy)
public function setSortBy(string $sortBy): void
{
$this->sortBy = $sortBy;
}
/**
* @return string
*/
public function getSortOrder(): string
{
return $this->sortOrder;
}
/**
* @param string $sortOrder
*/
public function setSortOrder(string $sortOrder)
public function setSortOrder(string $sortOrder): void
{
$this->sortOrder = $sortOrder;
}
/**
* @return string
*/
public function getCategories(): string
{
return $this->categories;
}
/**
* @param string $categories
*/
public function setCategories(string $categories)
public function setCategories(string $categories): void
{
$this->categories = $categories;
}
/**
* @return bool
*/
public function getIncludeSubCategories(): bool
{
return $this->includeSubCategories;
}
/**
* @param bool $includeSubCategories
*/
public function setIncludeSubCategories(bool $includeSubCategories)
public function setIncludeSubCategories(bool $includeSubCategories): void
{
$this->includeSubCategories = $includeSubCategories;
}
/**
* @return string
*/
public function getCategoryCombination(): string
{
return $this->categoryCombination;
}
/**
* @param string $categoryCombination
*/
public function setCategoryCombination(string $categoryCombination)
public function setCategoryCombination(string $categoryCombination): void
{
$this->categoryCombination = $categoryCombination;
}
/**
* @return string
*/
public function getRegion(): string
{
return $this->region;
}
/**
* @param \Wrm\DdEvents\Domain\Model\Region $region
*/
public function setRegion(string $region): void
{
$this->region = $region;
}
/**
* @return bool
*/
public function getHighlight(): bool
{
return $this->highlight;
}
/**
* @param bool $hightlight
*/
public function setHighlight(bool $highlight): void
{
$this->highlight = $highlight;
}
/**
* @return string
*/
public function getLimit(): string
{
return $this->limit;
}
/**
* @param string $limit
*/
public function setLimit(string $limit): void
{
$this->limit = $limit;
}
/**
* @return array
*/
public function getRecordUids(): array
{
return $this->recordUids;
}
/**
* @param array $recordUids
*/
public function setRecordUids(array $recordUids): void
{
$this->recordUids = $recordUids;

View file

@ -10,191 +10,136 @@ use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
use Wrm\Events\Domain\Repository\DateRepository;
use Wrm\Events\Service\DataProcessingForModels;
/**
* Event
*/
class Event extends AbstractEntity
{
/**
* title
*
* @var string
*/
protected $title = '';
/**
* subtitle
*
* @var string
*/
protected $subtitle = '';
/**
* globalId
*
* @var string
*/
protected $globalId = '';
/**
* slug
*
* @var string
*/
protected $slug = '';
/**
* highlight
*
* @var bool
*/
protected $highlight = false;
/**
* teaser
*
* @var string
*/
protected $teaser = '';
/**
* details
*
* @var string
*/
protected $details = '';
/**
* priceInfo
*
* @var string
*/
protected $priceInfo = '';
/**
* name
*
* @var string
*/
protected $name = '';
/**
* street
*
* @var string
*/
protected $street = '';
/**
* district
*
* @var string
*/
protected $district = '';
/**
* city
*
* @var string
*/
protected $city = '';
/**
* zip
*
* @var string
*/
protected $zip = '';
/**
* country
*
* @var string
*/
protected $country = '';
/**
* phone
*
* @var string
*/
protected $phone = '';
/**
* web
*
* @var string
*/
protected $web = '';
/**
* ticket
*
* @var string
*/
protected $ticket = '';
/**
* facebook
*
* @var string
*/
protected $facebook = '';
/**
* youtube
*
* @var string
*/
protected $youtube = '';
/**
* instagram
*
* @var string
*/
protected $instagram = '';
/**
* latitude
*
* @var string
*/
protected $latitude = '';
/**
* longitude
*
* @var string
*/
protected $longitude = '';
/**
* images
*
* @var ObjectStorage<FileReference>
* @Extbase\ORM\Cascade remove
*/
protected $images;
/**
* dates
*
* @var ObjectStorage<Date>
* @Extbase\ORM\Cascade remove
*/
protected $dates;
/**
* organizer
*
* @var \Wrm\Events\Domain\Model\Organizer
*/
protected $organizer = null;
/**
* region
*
* @var Region
*/
protected $region = null;
@ -205,8 +150,6 @@ class Event extends AbstractEntity
protected $pages = '';
/**
* categories
*
* @var ObjectStorage<Category>
*/
protected $categories;
@ -239,20 +182,17 @@ class Event extends AbstractEntity
/**
* @param DataProcessingForModels $dataProcessing
*/
public function injectDataProcessingForModels(DataProcessingForModels $dataProcessing)
public function injectDataProcessingForModels(DataProcessingForModels $dataProcessing): void
{
$this->dataProcessing = $dataProcessing;
}
public function initializeObject()
public function initializeObject(): void
{
$this->initStorageObjects();
}
/**
* @return void
*/
protected function initStorageObjects()
protected function initStorageObjects(): void
{
$this->images = new ObjectStorage();
$this->dates = new ObjectStorage();
@ -261,140 +201,82 @@ class Event extends AbstractEntity
$this->referencesEvents = new ObjectStorage();
}
/**
* Returns the globalId
*
* @return string $globalId
*/
public function getGlobalId()
public function getGlobalId(): string
{
return $this->globalId;
}
/**
* @param string $globalId
* @return void
*/
public function setGlobalId($globalId)
public function setGlobalId(string $globalId): void
{
$this->globalId = $globalId;
}
/**
* @return string $title
*/
public function getTitle()
public function getTitle(): string
{
return $this->title;
}
/**
* @param string $title
* @return void
*/
public function setTitle($title)
public function setTitle(string $title): void
{
$this->title = $title;
}
/**
* @return string $subtitle
*/
public function getSubtitle()
public function getSubtitle(): string
{
return $this->subtitle;
}
/**
* @param string $subtitle
* @return void
*/
public function setSubtitle($subtitle)
public function setSubtitle(string $subtitle): void
{
$this->subtitle = $subtitle;
}
/**
* @return string $teaser
*/
public function getTeaser()
public function getTeaser(): string
{
return $this->teaser;
}
/**
* @param string $teaser
* @return void
*/
public function setTeaser($teaser)
public function setTeaser(string $teaser): void
{
$this->teaser = $teaser;
}
/**
* @return string $details
*/
public function getDetails()
public function getDetails(): string
{
return $this->details;
}
/**
* @param string $details
* @return void
*/
public function setDetails($details)
public function setDetails(string $details): void
{
$this->details = $details;
}
/**
* @return string $priceInfo
*/
public function getPriceInfo()
public function getPriceInfo(): string
{
return $this->priceInfo;
}
/**
* @param string $priceInfo
* @return void
*/
public function setPriceInfo($priceInfo)
public function setPriceInfo(string $priceInfo): void
{
$this->priceInfo = $priceInfo;
}
/**
* @return string $name
*/
public function getName()
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
* @return void
*/
public function setName($name)
public function setName(string $name): void
{
$this->name = $name;
}
/**
* @return string $street
*/
public function getStreet()
public function getStreet(): string
{
return $this->street;
}
/**
* @param string $street
* @return void
*/
public function setStreet($street)
public function setStreet(string $street): void
{
$this->street = $street;
}
@ -402,184 +284,112 @@ class Event extends AbstractEntity
/**
* @return string $district
*/
public function getDistrict()
public function getDistrict(): string
{
return $this->district;
}
/**
* @param string $district
* @return void
*/
public function setDistrict($district)
public function setDistrict(string $district): void
{
$this->district = $district;
}
/**
* @return string $city
*/
public function getCity()
public function getCity(): string
{
return $this->city;
}
/**
* @param string $city
* @return void
*/
public function setCity($city)
public function setCity(string $city): void
{
$this->city = $city;
}
/**
* @return string $zip
*/
public function getZip()
public function getZip(): string
{
return $this->zip;
}
/**
* @param string $zip
* @return void
*/
public function setZip($zip)
public function setZip(string $zip): void
{
$this->zip = $zip;
}
/**
* @return string
*/
public function getPhone()
public function getPhone(): string
{
return $this->phone;
}
/**
* @param string $phone
*/
public function setPhone($phone)
public function setPhone(string $phone): void
{
$this->phone = $phone;
}
/**
* @return string $web
*/
public function getWeb()
public function getWeb(): string
{
return $this->web;
}
/**
* @param string $web
* @return void
*/
public function setWeb($web)
public function setWeb(string $web): void
{
$this->web = $web;
}
/**
* @return string $ticket
*/
public function getTicket()
public function getTicket(): string
{
return $this->ticket;
}
/**
* @param string $ticket
* @return void
*/
public function setTicket($ticket)
public function setTicket(string $ticket): void
{
$this->ticket = $ticket;
}
/**
* @return string $facebook
*/
public function getFacebook()
public function getFacebook(): string
{
return $this->facebook;
}
/**
* @param string $facebook
* @return void
*/
public function setFacebook($facebook)
public function setFacebook(string $facebook): void
{
$this->facebook = $facebook;
}
/**
* @return string $youtube
*/
public function getYoutube()
public function getYoutube(): string
{
return $this->youtube;
}
/**
* @param string $youtube
* @return void
*/
public function setYoutube($youtube)
public function setYoutube(string $youtube): void
{
$this->youtube = $youtube;
}
/**
* @return string $instagram
*/
public function getInstagram()
public function getInstagram(): string
{
return $this->instagram;
}
/**
* @param string $instagram
*/
public function setInstagram(string $instagram)
public function setInstagram(string $instagram): void
{
$this->instagram = $instagram;
}
/**
* @return string $latitude
*/
public function getLatitude()
public function getLatitude(): string
{
return $this->latitude;
}
/**
* @param string $latitude
* @return void
*/
public function setLatitude($latitude)
public function setLatitude(string $latitude): void
{
$this->latitude = $latitude;
}
/**
* @return string $longitude
*/
public function getLongitude()
public function getLongitude(): string
{
return $this->longitude;
}
/**
* @param string $longitude
* @return void
*/
public function setLongitude($longitude)
public function setLongitude(string $longitude): void
{
$this->longitude = $longitude;
}
@ -594,52 +404,34 @@ class Event extends AbstractEntity
/**
* @param ObjectStorage<FileReference> $images
* @return void
*/
public function setImages(FileReference $images)
public function setImages(ObjectStorage $images): void
{
$this->images = $images;
}
/**
* @return string $slug
*/
public function getSlug()
public function getSlug(): string
{
return $this->slug;
}
/**
* @param string $slug
* @return void
*/
public function setSlug($slug)
public function setSlug(string $slug): void
{
$this->slug = $slug;
}
/**
* @param Date $date
* @return Event
*/
public function addDate(Date $date): self
public function addDate(Date $date): void
{
$this->dates->attach($date);
return $this;
}
/**
* @param Date $date
* @return Event
*/
public function removeDate(Date $date): self
public function removeDate(Date $date): void
{
$this->dates->detach($date);
return $this;
}
/**
* @return ObjectStorage
* @return ObjectStorage<Date>
*/
public function getDates(): ObjectStorage
{
@ -647,33 +439,21 @@ class Event extends AbstractEntity
}
/**
* @param ObjectStorage $dates
*
* @return Event
* @param ObjectStorage<Date> $dates
*/
public function setDates($dates): self
public function setDates(ObjectStorage $dates): void
{
$this->dates = $dates;
return $this;
}
/**
* @param ObjectStorage $dates
* @return void
* @param ObjectStorage<Date> $dates
*/
public function removeAllDates(ObjectStorage $dates)
public function removeAllDates(ObjectStorage $dates): void
{
$this->dates->removeAll($dates);
}
/**
* @return \Wrm\Events\Domain\Model\Organizer $organizer
*/
public function getOrganizer()
{
return $this->organizer;
}
/**
* @return ObjectStorage<Partner>
*/
@ -690,70 +470,42 @@ class Event extends AbstractEntity
return $this->referencesEvents;
}
/**
* @param \Wrm\Events\Domain\Model\Organizer $organizer
* @return void
*/
public function setOrganizer(Organizer $organizer)
public function setOrganizer(Organizer $organizer): void
{
$this->organizer = $organizer;
}
/**
* @return \Wrm\Events\Domain\Model\Region $region
*/
public function getRegion()
public function getOrganizer(): ?Organizer
{
return $this->organizer;
}
public function getRegion(): ?Region
{
return $this->region;
}
/**
* @param \Wrm\Events\Domain\Model\Region $region
* @return void
*/
public function setRegion(Region $region)
public function setRegion(Region $region): void
{
$this->region = $region;
}
/**
* @return bool $highlight
*/
public function getHighlight()
{
return $this->highlight;
}
/**
* @param bool $highlight
* @return void
*/
public function setHighlight($highlight)
public function setHighlight(bool $highlight): void
{
$this->highlight = $highlight;
}
/**
* @return bool
*/
public function isHighlight()
public function isHighlight(): bool
{
return $this->highlight;
}
/**
* @return string $country
*/
public function getCountry()
public function getCountry(): string
{
return $this->country;
}
/**
* @param string $country
* @return void
*/
public function setCountry($country)
public function setCountry(string $country): void
{
$this->country = $country;
}
@ -770,10 +522,7 @@ class Event extends AbstractEntity
return $pages;
}
/**
* @param \TYPO3\CMS\Extbase\Domain\Model\Category<\TYPO3\CMS\Extbase\Domain\Model\Category> $category
*/
public function addCategory(Category $category)
public function addCategory(Category $category): void
{
$this->categories->attach($category);
}
@ -790,34 +539,24 @@ class Event extends AbstractEntity
}
/**
* @param TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> $categories
* @param ObjectStorage<Category> $categories
*/
public function setCategories(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $categories)
public function setCategories(ObjectStorage $categories): void
{
$this->categories = $categories;
}
/**
* @param int $languageUid
* @return void
*/
public function setLanguageUid($languageUid)
public function setLanguageUid(int $languageUid): void
{
$this->_languageUid = $languageUid;
}
/**
* @return int
*/
public function getLanguageUid()
public function getLanguageUid(): int
{
return $this->_languageUid;
}
/**
* @return int
*/
public function getLocalizedUid()
public function getLocalizedUid(): int
{
return $this->_localizedUid;
}

View file

@ -15,63 +15,44 @@ namespace Wrm\Events\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* Organizer
*/
class Organizer extends AbstractEntity
{
/**
* name
*
* @var string
*/
protected $name = '';
/**
* street
*
* @var string
*/
protected $street = '';
/**
* district
*
* @var string
*/
protected $district = '';
/**
* city
*
* @var string
*/
protected $city = '';
/**
* zip
*
* @var string
*/
protected $zip = '';
/**
* phone
*
* @var string
*/
protected $phone = '';
/**
* web
*
* @var string
*/
protected $web = '';
/**
* email
*
* @var string
*/
protected $email = '';
@ -81,209 +62,92 @@ class Organizer extends AbstractEntity
*/
protected $_languageUid;
/**
* Returns the name
*
* @return string $name
*/
public function getName()
public function getName(): string
{
return $this->name;
}
/**
* Sets the name
*
* @param string $name
* @return void
*/
public function setName($name)
public function setName(string $name): void
{
$this->name = $name;
}
/**
* Returns the street
*
* @return string $street
*/
public function getStreet()
public function getStreet(): string
{
return $this->street;
}
/**
* Sets the street
*
* @param string $street
* @return void
*/
public function setStreet($street)
public function setStreet(string $street): void
{
$this->street = $street;
}
/**
* Returns the district
*
* @return string $district
*/
public function getDistrict()
public function getDistrict(): string
{
return $this->district;
}
/**
* Sets the district
*
* @param string $district
* @return void
*/
public function setDistrict($district)
public function setDistrict(string $district): void
{
$this->district = $district;
}
/**
* Returns the city
*
* @return string $city
*/
public function getCity()
public function getCity(): string
{
return $this->city;
}
/**
* Sets the city
*
* @param string $city
* @return void
*/
public function setCity($city)
public function setCity(string $city): void
{
$this->city = $city;
}
/**
* Returns the zip
*
* @return string $zip
*/
public function getZip()
public function getZip(): string
{
return $this->zip;
}
/**
* Sets the zip
*
* @param string $zip
* @return void
*/
public function setZip($zip)
public function setZip(string $zip): void
{
$this->zip = $zip;
}
/**
* Returns the phone
*
* @return string $phone
*/
public function getPhone()
public function getPhone(): string
{
return $this->phone;
}
/**
* Sets the phone
*
* @param string $phone
* @return void
*/
public function setPhone($phone)
public function setPhone(string $phone): void
{
$this->phone = $phone;
}
/**
* Returns the web
*
* @return string $web
*/
public function getWeb()
public function getWeb(): string
{
return $this->web;
}
/**
* Sets the web
*
* @param string $web
* @return void
*/
public function setWeb($web)
public function setWeb(string $web): void
{
$this->web = $web;
}
/**
* Returns the email
*
* @return string $email
*/
public function getEmail()
public function getEmail(): string
{
return $this->email;
}
/**
* Sets the email
*
* @param string $email
* @return void
*/
public function setEmail($email)
public function setEmail(string $email): void
{
$this->email = $email;
}
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*
* @return void
*/
protected function initStorageObjects()
{
}
/**
* @param int $languageUid
* @return void
*/
public function setLanguageUid($languageUid)
public function setLanguageUid(int $languageUid): void
{
$this->_languageUid = $languageUid;
}
/**
* @return int
*/
public function getLanguageUid()
public function getLanguageUid(): int
{
return $this->_languageUid;
}

View file

@ -52,6 +52,9 @@ class Partner extends AbstractEntity
return $this->link;
}
/**
* @return ObjectStorage<FileReference>
*/
public function getImages(): ObjectStorage
{
return $this->images;

View file

@ -15,14 +15,9 @@ namespace Wrm\Events\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* Region
*/
class Region extends AbstractEntity
{
/**
* title
*
* @var string
*/
protected $title = '';
@ -32,62 +27,22 @@ class Region extends AbstractEntity
*/
protected $_languageUid;
/**
* Returns the title
*
* @return string $title
*/
public function getTitle()
public function getTitle(): string
{
return $this->title;
}
/**
* Sets the title
*
* @param string $title
* @return void
*/
public function setTitle($title)
public function setTitle(string $title): void
{
$this->title = $title;
}
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*
* @return void
*/
protected function initStorageObjects()
{
}
/**
* @param int $languageUid
* @return void
*/
public function setLanguageUid($languageUid)
public function setLanguageUid(int $languageUid): void
{
$this->_languageUid = $languageUid;
}
/**
* @return int
*/
public function getLanguageUid()
public function getLanguageUid(): int
{
return $this->_languageUid;
}

View file

@ -41,17 +41,20 @@ class CategoryRepository extends Repository
*/
protected $dataMapper;
public function injectConnectionPool(ConnectionPool $connectionPool)
public function injectConnectionPool(ConnectionPool $connectionPool): void
{
$this->connectionPool = $connectionPool;
}
public function injectDataMapper(DataMapper $dataMapper)
public function injectDataMapper(DataMapper $dataMapper): void
{
$this->dataMapper = $dataMapper;
}
public function findAllCurrentlyAssigned()
/**
* @return array<Category>
*/
public function findAllCurrentlyAssigned(): array
{
$qb = $this->connectionPool->getQueryBuilderForTable('tx_events_domain_model_event');
$qb->select('category.*');

View file

@ -5,6 +5,7 @@ namespace Wrm\Events\Domain\Repository;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
use TYPO3\CMS\Extbase\Persistence\Generic\QueryResult;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
@ -13,12 +14,7 @@ use Wrm\Events\Service\CategoryService;
class DateRepository extends Repository
{
/**
* Find all dates based on selected uids
* @param string $uids
* @return array
*/
public function findByUids($uids)
public function findByUids(string $uids): QueryResult
{
$uids = explode(',', $uids);
$query = $this->createQuery();
@ -28,26 +24,12 @@ class DateRepository extends Repository
return $query->execute();
}
/**
* @param DateDemand $demand
* @return QueryResultInterface
* @throws InvalidQueryException
*/
public function findByDemand(DateDemand $demand)
public function findByDemand(DateDemand $demand): QueryResult
{
$query = $this->createDemandQuery($demand);
return $query->execute();
// For testing purposes
// $query = $this->createDemandQueryViaBuilder($demand);
// return $query->execute()->fetchAll();
}
/**
* @param DateDemand $demand
* @return QueryInterface
* @throws InvalidQueryException
*/
protected function createDemandQuery(DateDemand $demand): QueryInterface
{
$query = $this->createQuery();
@ -86,7 +68,7 @@ class DateRepository extends Repository
$constraints['ends'] = $query->lessThanOrEqual('end', $demand->getEnd());
}
if ($demand->getStart() === '' && $demand->getEnd() === '') {
if ($demand->getStart() !== null && $demand->getEnd() !== null) {
$now = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
$constraints['untilnow'] = $query->greaterThanOrEqual('start', $now);
}
@ -130,38 +112,23 @@ class DateRepository extends Repository
return $query->logicalOr($constraints);
}
/**
* @param QueryInterface $query
* @param string $categories
* @param bool $includeSubCategories
* @return array
* @throws InvalidQueryException
*/
protected function createCategoryConstraint(QueryInterface $query, $categories, bool $includeSubCategories = false): array
protected function createCategoryConstraint(QueryInterface $query, string $categories, bool $includeSubCategories = false): array
{
$constraints = [];
if ($includeSubCategories) {
$categoryService = GeneralUtility::makeInstance(CategoryService::class);
$allCategories = $categoryService->getChildrenCategories($categories);
if (!\is_array($allCategories)) {
$allCategories = GeneralUtility::intExplode(',', $allCategories, true);
}
} else {
$allCategories = GeneralUtility::intExplode(',', $categories, true);
$categories = $categoryService->getChildrenCategories($categories);
}
foreach ($allCategories as $category) {
$categories = GeneralUtility::intExplode(',', $categories, true);
foreach ($categories as $category) {
$constraints[] = $query->contains('event.categories', $category);
}
return $constraints;
}
/**
* findSearchWord with Query Builder
* @param $search
*/
public function findSearchWord($search)
public function findSearchWord(string $search): array
{
$connection = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable('tx_events_domain_model_date');

View file

@ -17,8 +17,8 @@ namespace Wrm\Events\Domain\Repository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
use TYPO3\CMS\Extbase\Persistence\Generic\QueryResult;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
use Wrm\Events\Domain\Model\Dto\EventDemand;
use Wrm\Events\Domain\Model\Event;
@ -26,7 +26,7 @@ use Wrm\Events\Service\CategoryService;
class EventRepository extends Repository
{
public function findByUids(string $uids): QueryResultInterface
public function findByUids(string $uids): QueryResult
{
$query = $this->createQuery();
$query->matching($query->in('uid', GeneralUtility::intExplode(',', $uids)));
@ -35,8 +35,7 @@ class EventRepository extends Repository
}
/**
* @return QueryResultInterface|array
* @throws InvalidQueryException
* @return QueryResult|array
*/
public function findByDemand(EventDemand $demand)
{
@ -49,9 +48,6 @@ class EventRepository extends Repository
return $query->execute();
}
/**
* @throws InvalidQueryException
*/
protected function createDemandQuery(EventDemand $demand): QueryInterface
{
$query = $this->createQuery();
@ -133,24 +129,18 @@ class EventRepository extends Repository
return $constraints;
}
/**
* @throws InvalidQueryException
*/
protected function createCategoryConstraint(QueryInterface $query, EventDemand $demand): ConstraintInterface
{
$constraints = [];
$allCategories = GeneralUtility::intExplode(',', $demand->getCategories(), true);
$categories = $demand->getCategories();
if ($demand->getIncludeSubCategories()) {
$categoryService = GeneralUtility::makeInstance(CategoryService::class);
$allCategories = $categoryService->getChildrenCategories($demand->getCategories());
if (!\is_array($allCategories)) {
$allCategories = GeneralUtility::intExplode(',', $allCategories, true);
}
$categories = $categoryService->getChildrenCategories($categories);
}
foreach ($allCategories as $category) {
$categories = GeneralUtility::intExplode(',', $categories, true);
foreach ($categories as $category) {
$constraints[] = $query->contains('categories', $category);
}
@ -160,7 +150,7 @@ class EventRepository extends Repository
return $query->logicalAnd($constraints);
}
public function findSearchWord($search)
public function findSearchWord(string $search): QueryResult
{
$query = $this->createQuery();
$query->matching($query->like('title', '%' . $search . '%'));

View file

@ -94,7 +94,7 @@ class Database
}, $records);
}
public function deleteDates(int ...$uids)
public function deleteDates(int ...$uids): void
{
/* @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)

View file

@ -25,21 +25,21 @@ class CleanupService
$this->files = $files;
}
public function deleteAllData()
public function deleteAllData(): void
{
$this->database->truncateTables(...[Database::DATE_TABLE, Database::ORGANIZER_TABLE]);
$this->removeViaDataHandler($this->database->getDeletionStructureForEvents());
$this->files->deleteAll();
}
public function deletePastData()
public function deletePastData(): void
{
$this->database->deleteDates(...$this->database->getPastDates());
$this->removeViaDataHandler($this->database->getDeletionStructureForEventsWithoutDates());
$this->files->deleteDangling();
}
private function removeViaDataHandler(array $structure)
private function removeViaDataHandler(array $structure): void
{
/* @var DataHandler $dataHandler */
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);

View file

@ -463,14 +463,14 @@ class DestinationDataImportService
}
$tmpOrganizer = $this->objectManager->get(Organizer::class);
$tmpOrganizer->setLanguageUid(-1);
$tmpOrganizer->setName($address['name']);
$tmpOrganizer->setCity($address['city']);
$tmpOrganizer->setZip($address['zip']);
$tmpOrganizer->setStreet($address['street']);
$tmpOrganizer->setPhone($address['phone']);
$tmpOrganizer->setWeb($address['web']);
$tmpOrganizer->setEmail($address['email']);
$tmpOrganizer->setDistrict($address['district']);
$tmpOrganizer->setName($address['name'] ?? '');
$tmpOrganizer->setCity($address['city'] ?? '');
$tmpOrganizer->setZip($address['zip'] ?? '');
$tmpOrganizer->setStreet($address['street'] ?? '');
$tmpOrganizer->setPhone($address['phone'] ?? '');
$tmpOrganizer->setWeb($address['web'] ?? '');
$tmpOrganizer->setEmail($address['email'] ?? '');
$tmpOrganizer->setDistrict($address['district'] ?? '');
$this->organizerRepository->add($tmpOrganizer);
$this->tmpCurrentEvent->setOrganizer($tmpOrganizer);
}
@ -482,27 +482,13 @@ class DestinationDataImportService
*/
protected function setAddress(array $event)
{
if (!empty($event['name'])) {
$this->tmpCurrentEvent->setName($event['name']);
}
if (!empty($event['street'])) {
$this->tmpCurrentEvent->setStreet($event['street']);
}
if (!empty($event['city'])) {
$this->tmpCurrentEvent->setCity($event['city']);
}
if (!empty($event['zip'])) {
$this->tmpCurrentEvent->setZip($event['zip']);
}
if (!empty($event['country'])) {
$this->tmpCurrentEvent->setCountry($event['country']);
}
if (!empty($event['phone'])) {
$this->tmpCurrentEvent->setPhone($event['phone']);
}
if (!empty($event['web'])) {
$this->tmpCurrentEvent->setWeb($event['web']);
}
$this->tmpCurrentEvent->setName($event['name'] ?? '');
$this->tmpCurrentEvent->setStreet($event['street'] ?? '');
$this->tmpCurrentEvent->setCity($event['city'] ?? '');
$this->tmpCurrentEvent->setZip($event['zip'] ?? '');
$this->tmpCurrentEvent->setCountry($event['country'] ?? '');
$this->tmpCurrentEvent->setPhone($event['phone'] ?? '');
$this->tmpCurrentEvent->setWeb($event['web'] ?? '');
}
/**

View file

@ -12,7 +12,8 @@
"require": {
"typo3/cms-core": "^10.4",
"typo3/cms-extbase": "^10.4",
"typo3/cms-fluid": "^10.4"
"typo3/cms-fluid": "^10.4",
"typo3/cms-frontend": "^10.4"
},
"autoload": {
"psr-4": {
@ -33,6 +34,9 @@
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.5",
"symplify/easy-coding-standard": "^9.4"
"symplify/easy-coding-standard": "^9.4",
"phpstan/phpstan": "^0.12.98",
"phpstan/extension-installer": "^1.1",
"saschaegerer/phpstan-typo3": "^0.13.3"
}
}

337
phpstan-baseline.neon Normal file
View file

@ -0,0 +1,337 @@
parameters:
ignoreErrors:
-
message: "#^Cannot call method fetchAll\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Domain/Repository/CategoryRepository.php
-
message: "#^Cannot call method fetchAll\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Domain/Repository/DateRepository.php
-
message: "#^Cannot call method fetch\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Extbase/AddSpecialProperties.php
-
message: "#^Cannot call method fetchColumn\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Extbase/AddSpecialProperties.php
-
message: "#^Cannot call method fetch\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Service/CategoryService.php
-
message: "#^Cannot call method fetchAll\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Service/CategoryService.php
-
message: "#^Cannot call method fetchAll\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 3
path: Classes/Service/Cleanup/Database.php
-
message: "#^Call to method deleteFile\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Storage\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Call to method getFile\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Storage\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Call to method hasFile\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Storage\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Cannot call method fetchAll\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\Cleanup\\\\Files\\:\\:delete\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\Cleanup\\\\Files\\:\\:deleteAll\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\Cleanup\\\\Files\\:\\:deleteDangling\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\Cleanup\\\\Files\\:\\:deleteFromDb\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\Cleanup\\\\Files\\:\\:deleteFromFal\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/Cleanup/Files.php
-
message: "#^Access to an undefined property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$sysCategoriesPid\\.$#"
count: 2
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileInterface\\:\\:getUid\\(\\)\\.$#"
count: 2
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Cannot call method fetch\\(\\) on Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement\\|int\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Cannot call method sanitizeFileName\\(\\) on TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceStorage\\|null\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:getAttributeValue\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:getOrCreateEvent\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:import\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:import\\(\\) has parameter \\$filesFolder with no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:import\\(\\) has parameter \\$regionUid with no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:import\\(\\) has parameter \\$restExperience with no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:import\\(\\) has parameter \\$storagePid with no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:loadFile\\(\\) should return string but returns false\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:multi_array_key_exists\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:processData\\(\\) has parameter \\$data with no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setAddress\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setAssets\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setCategories\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setDates\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setLatLng\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setOrganizer\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setSocial\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setTexts\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Method Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:setTickets\\(\\) has no return typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^PHPDoc tag @param has invalid value \\(\\$data\\)\\: Unexpected token \"\\$data\", expected type at offset 18$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^PHPDoc tag @param has invalid value \\(\\$filesFolder\\)\\: Unexpected token \"\\$filesFolder\", expected type at offset 99$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^PHPDoc tag @param has invalid value \\(\\$regionUid\\)\\: Unexpected token \"\\$regionUid\", expected type at offset 74$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^PHPDoc tag @param has invalid value \\(\\$restExperience\\)\\: Unexpected token \"\\$restExperience\", expected type at offset 18$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^PHPDoc tag @param has invalid value \\(\\$storagePid\\)\\: Unexpected token \"\\$storagePid\", expected type at offset 48$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^PHPDoc tag @var has invalid value \\(\\)\\: Unexpected token \"\\\\n \", expected type at offset 15$#"
count: 15
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Parameter \\#1 \\$hour of method DateTime\\:\\:setTime\\(\\) expects int, string given\\.$#"
count: 4
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Parameter \\#1 \\$parent of method TYPO3\\\\CMS\\\\Extbase\\\\Domain\\\\Model\\\\Category\\:\\:setParent\\(\\) expects TYPO3\\\\CMS\\\\Extbase\\\\Domain\\\\Model\\\\Category, Wrm\\\\Events\\\\Domain\\\\Model\\\\Category\\|null given\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Parameter \\#1 \\$timestamp of method DateTime\\:\\:setTimestamp\\(\\) expects int, int\\|false given\\.$#"
count: 2
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Parameter \\#2 \\$minute of method DateTime\\:\\:setTime\\(\\) expects int, string given\\.$#"
count: 4
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Parameter \\#2 \\$now of function strtotime expects int, int\\|false given\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$categoriesPid has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$categoryParentUid has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$environment has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$filesFolder has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$logger has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$regionUid has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$restExperience has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$restLicenseKey has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$restLimit has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$restMode has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$restTemplate has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$restType has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$restUrl has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$storage has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$storagePid has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php
-
message: "#^Property Wrm\\\\Events\\\\Service\\\\DestinationDataImportService\\:\\:\\$tmpCurrentEvent has no typehint specified\\.$#"
count: 1
path: Classes/Service/DestinationDataImportService.php

9
phpstan.neon Normal file
View file

@ -0,0 +1,9 @@
includes:
- phpstan-baseline.neon
parameters:
level: max
paths:
- Classes
- Configuration
checkMissingIterableValueType: false
reportUnmatchedIgnoredErrors: false