refactor: type declarations via Rector

rector.php gets the typeDeclarations set: return types (void, array,
unions) where the code proves them, typed closures and arrow functions,
typed properties from constructors and assignments in the DTOs.

Skipped: rules that infer scalar or array parameter types from call
sites or docblocks, and the removal of casts the docblocks call
redundant. Values from the database, form input and the import feeds
arrive as strings and would throw instead of being converted (e.g. the
(int) cast of the newsletter list ids stays).

Checked locally: cache warmup, frontend crawl (~1,900 URLs), the
backchannel APIs and the newsletter form validation behave as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-26 11:21:12 +01:00
1 parent 4fe06267c9
commit ecd5ea66c5
87 files changed
+461 -552

No files matched your search

@@ -14,10 +14,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class ContentFeedConfiguration
{
/**
* @var array
*/
private $configuration;
private array $configuration;
public function __construct(ExtensionConfiguration $extensionConfiguration)
{
@@ -21,10 +21,7 @@ class PageTree
'shortcut_mode', 'content_from_pid', 'tstamp', 'sys_language_uid', 'l10n_parent', 'l18n_cfg',
];
/**
* @var int
*/
private $now;
private readonly int $now;
/**
* @var array<int, array>|null default-language rows by uid
@@ -34,12 +31,12 @@ class PageTree
/**
* @var array<int, int[]> child uids by parent uid, in sorting order
*/
private $children = [];
private array $children = [];
/**
* @var array<int, array<int, array>> overlay rows by default-language uid and language id
*/
private $overlays = [];
private array $overlays = [];
public function __construct(private readonly ConnectionPool $connectionPool, Context $context)
{
@@ -23,17 +23,17 @@ class UrlResolver
/**
* @var string[]
*/
private $includedSites;
private readonly array $includedSites;
/**
* @var array<string, int> news detail page uid by site identifier
*/
private $newsDetailPages;
private array $newsDetailPages;
/**
* @var array<int, Site|null>
*/
private $sitesByPage = [];
private array $sitesByPage = [];
public function __construct(
private readonly SiteFinder $siteFinder,
@@ -19,7 +19,7 @@ class AjaxSearchController extends ActionController
{
}
public function initializeSearchresultAction()
public function initializeSearchresultAction(): void
{
$forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'] ?? '', true);
$this->processFilterSettingsArgument($forcedConceptUids);
@@ -34,7 +34,7 @@ class AjaxTableController extends ActionController
) {
}
public function initializeDatesAction()
public function initializeDatesAction(): void
{
if ($this->request->hasArgument('dateFrom')) {
$dateFrom = $this->request->getArgument('dateFrom');
@@ -86,7 +86,7 @@ class AjaxTableController extends ActionController
'nonBookableDateUids' => $nonBookableDateUids,
]);
$bookableDates = array_filter($allDates, fn(array $date) => $date['available'] > 0);
$bookableDates = array_filter($allDates, fn(array $date): bool => $date['available'] > 0);
$includedServices = $this->dateService->groupIncludedServices($bookableDates);
$altProductLink = null;
@@ -210,8 +210,8 @@ class AjaxTableController extends ActionController
public function eventPricetableAction(Product $product): ResponseInterface
{
$roomTypes = GeneralUtility::trimExplode(',', $this->settings['priceTableRoomTypes'] ?? '');
$roomTypesPax = array_map(fn($type) => (int) $type, $roomTypes);
$roomTypesLabels = array_map(function ($type) {
$roomTypesPax = array_map(fn($type): int => (int) $type, $roomTypes);
$roomTypesLabels = array_map(function ($type): string {
$label = (int) $type . 'er';
if (str_contains($type, '+')) {
$label .= '+';
@@ -28,7 +28,7 @@ class RegionController extends ActionController
$region = $this->regionRepository->findByIdentifier($regionUid);
}
$additionalRegionUids = GeneralUtility::trimExplode(',', ($this->settings['additionalRegionUids'] ?? ''), true);
$additionalRegionUids = array_map(fn($uid) => (int)$uid, $additionalRegionUids);
$additionalRegionUids = array_map(fn($uid): int => (int)$uid, $additionalRegionUids);
$teaserRegionUids = array_merge([$region->getUid()], $additionalRegionUids);
$filterSettings = [
'regionUids' => $teaserRegionUids,
@@ -26,7 +26,7 @@ class SearchController extends ActionController
{
}
public function initializeSearchresultAction()
public function initializeSearchresultAction(): void
{
// Process encoded filtersettings from static search result.
// Explicit filter settings win: they carry the visitor's current selection,
@@ -64,7 +64,7 @@ class TravelinfoController extends ActionController
throw new ImmediateResponseException($response, 1731071856);
}
private function handleRequest(string $travelCode, Travelinfo $travelInfo)
private function handleRequest(string $travelCode, Travelinfo $travelInfo): void
{
// fetch travel data via API call
@@ -81,7 +81,7 @@ class TravelinfoController extends ActionController
}
// extract courses from additional services
$courses = array_filter($travelData['additionalServices'] ?? [], fn($service) => 'KUR' === $service['subType']);
$courses = array_filter($travelData['additionalServices'] ?? [], fn($service): bool => 'KUR' === $service['subType']);
// extract board services from included services
$includedServicesBoard = $travelData['selectionGroups'][self::SELECTION_ID_BOARD] ?? [];
@@ -89,7 +89,7 @@ class TravelinfoController extends ActionController
// extract bus departure time if applicable
$departureDayTime = null;
$service = array_filter($travelData['transportationServices'] ?? [], fn($service) => 'BUS' === $service['subType'] && 'RUECK' === $service['direction']);
$service = array_filter($travelData['transportationServices'] ?? [], fn($service): bool => 'BUS' === $service['subType'] && 'RUECK' === $service['direction']);
if ($serviceDetail = reset($service)) {
$departureDayTime = $serviceDetail['dayTime'];
}
@@ -115,7 +115,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $detailPage
*/
public function setDetailPage($detailPage)
public function setDetailPage($detailPage): void
{
$this->detailPage = $detailPage;
}
@@ -131,7 +131,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $season
*/
public function setSeason($season)
public function setSeason($season): void
{
$this->season = $season;
}
@@ -157,7 +157,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param float $latitude
*/
public function setLatitude($latitude)
public function setLatitude($latitude): void
{
$this->latitude = $latitude;
}
@@ -173,7 +173,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param float $longitude
*/
public function setLongitude($longitude)
public function setLongitude($longitude): void
{
$this->longitude = $longitude;
}
@@ -189,7 +189,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -205,7 +205,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $nameInternal
*/
public function setNameInternal($nameInternal)
public function setNameInternal($nameInternal): void
{
$this->nameInternal = $nameInternal;
}
@@ -221,7 +221,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $keywords
*/
public function setKeywords($keywords)
public function setKeywords($keywords): void
{
$this->keywords = $keywords;
}
@@ -237,7 +237,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $headline
*/
public function setHeadline($headline)
public function setHeadline($headline): void
{
$this->headline = $headline;
}
@@ -253,7 +253,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $teaser
*/
public function setTeaser($teaser)
public function setTeaser($teaser): void
{
$this->teaser = $teaser;
}
@@ -269,7 +269,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $headerTitle
*/
public function setHeaderTitle($headerTitle)
public function setHeaderTitle($headerTitle): void
{
$this->headerTitle = $headerTitle;
}
@@ -285,7 +285,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $headerSubtitle
*/
public function setHeaderSubtitle($headerSubtitle)
public function setHeaderSubtitle($headerSubtitle): void
{
$this->headerSubtitle = $headerSubtitle;
}
@@ -301,7 +301,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $description
*/
public function setDescription($description)
public function setDescription($description): void
{
$this->description = $description;
}
@@ -317,7 +317,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param string $descriptionExtended
*/
public function setDescriptionExtended($descriptionExtended)
public function setDescriptionExtended($descriptionExtended): void
{
$this->descriptionExtended = $descriptionExtended;
}
@@ -333,7 +333,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param ObjectStorage<FileReference> $images
*/
public function setImages(ObjectStorage $images)
public function setImages(ObjectStorage $images): void
{
$this->images = $images;
}
@@ -361,7 +361,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param ObjectStorage $teaserImages
*/
public function setTeaserImages($teaserImages)
public function setTeaserImages($teaserImages): void
{
$this->teaserImages = $teaserImages;
}
@@ -391,7 +391,7 @@ class AbstractDestination extends AbstractEntity
/**
* @param ObjectStorage $headerImages
*/
public function setHeaderImages($headerImages)
public function setHeaderImages($headerImages): void
{
$this->headerImages = $headerImages;
}
@@ -35,7 +35,7 @@ class Badge extends AbstractEntity
/**
* @param string $title
*/
public function setTitle($title)
public function setTitle($title): void
{
$this->title = $title;
}
@@ -51,7 +51,7 @@ class Badge extends AbstractEntity
/**
* @param string $subtitle
*/
public function setSubtitle($subtitle)
public function setSubtitle($subtitle): void
{
$this->subtitle = $subtitle;
}
@@ -67,7 +67,7 @@ class Badge extends AbstractEntity
/**
* @param string $link
*/
public function setLink($link)
public function setLink($link): void
{
$this->link = $link;
}
@@ -59,7 +59,7 @@ class City extends AbstractDestination implements TeaserInterface
/**
* @param bool $excludeFromTeasergroups
*/
public function setExcludeFromTeasergroups($excludeFromTeasergroups)
public function setExcludeFromTeasergroups($excludeFromTeasergroups): void
{
$this->excludeFromTeasergroups = (bool) $excludeFromTeasergroups;
}
@@ -74,7 +74,7 @@ class City extends AbstractDestination implements TeaserInterface
/**
* @param string $party
*/
public function setParty($party) {
public function setParty($party): void {
$this->party = $party;
}
@@ -88,7 +88,7 @@ class City extends AbstractDestination implements TeaserInterface
/**
* @param string $leisure
*/
public function setLeisure($leisure) {
public function setLeisure($leisure): void {
$this->leisure = $leisure;
}
@@ -117,7 +117,7 @@ class City extends AbstractDestination implements TeaserInterface
return $this->country;
}
public function setCountry(Country $country)
public function setCountry(Country $country): void
{
$this->country = $country;
}
@@ -130,7 +130,7 @@ class City extends AbstractDestination implements TeaserInterface
return $this->region;
}
public function setRegion(Region $region)
public function setRegion(Region $region): void
{
$this->region = $region;
}
@@ -146,7 +146,7 @@ class City extends AbstractDestination implements TeaserInterface
/**
* @param ObjectStorage<Fact> $facts
*/
public function setFacts(ObjectStorage $facts)
public function setFacts(ObjectStorage $facts): void
{
$this->facts = $facts;
}
@@ -162,7 +162,7 @@ class City extends AbstractDestination implements TeaserInterface
/**
* @param Officetip $officetip
*/
public function setOfficetip($officetip)
public function setOfficetip($officetip): void
{
$this->officetip = $officetip;
}
@@ -122,7 +122,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param int $busProId
*/
public function setBusProId($busProId) {
public function setBusProId($busProId): void {
$this->busProId = $busProId;
}
@@ -137,7 +137,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -153,7 +153,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $code
*/
public function setCode($code)
public function setCode($code): void
{
$this->code = $code;
}
@@ -169,7 +169,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $teaser
*/
public function setTeaser($teaser)
public function setTeaser($teaser): void
{
$this->teaser = $teaser;
}
@@ -179,7 +179,7 @@ class Concept extends AbstractEntity implements TeaserInterface
return $this->popupText;
}
public function setPopupText($popupText)
public function setPopupText($popupText): static
{
$this->popupText = $popupText;
@@ -191,7 +191,7 @@ class Concept extends AbstractEntity implements TeaserInterface
return $this->popupTitle;
}
public function setPopupTitle($popupTitle)
public function setPopupTitle($popupTitle): static
{
$this->popupTitle = $popupTitle;
@@ -203,7 +203,7 @@ class Concept extends AbstractEntity implements TeaserInterface
return $this->popupButtonLabel;
}
public function setPopupButtonLabel($popupButtonLabel)
public function setPopupButtonLabel($popupButtonLabel): static
{
$this->popupButtonLabel = $popupButtonLabel;
@@ -221,7 +221,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $headline
*/
public function setHeadline($headline)
public function setHeadline($headline): void
{
$this->headline = $headline;
}
@@ -237,7 +237,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $headerTitle
*/
public function setHeaderTitle($headerTitle)
public function setHeaderTitle($headerTitle): void
{
$this->headerTitle = $headerTitle;
}
@@ -253,7 +253,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $headerSubtitle
*/
public function setHeaderSubtitle($headerSubtitle)
public function setHeaderSubtitle($headerSubtitle): void
{
$this->headerSubtitle = $headerSubtitle;
}
@@ -269,7 +269,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $description
*/
public function setDescription($description)
public function setDescription($description): void
{
$this->description = $description;
}
@@ -285,7 +285,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $descriptionExtended
*/
public function setDescriptionExtended($descriptionExtended)
public function setDescriptionExtended($descriptionExtended): void
{
$this->descriptionExtended = $descriptionExtended;
}
@@ -301,7 +301,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param string $detailPage
*/
public function setDetailPage($detailPage)
public function setDetailPage($detailPage): void
{
$this->detailPage = $detailPage;
}
@@ -329,7 +329,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $teaserImages
*/
public function setTeaserImages($teaserImages)
public function setTeaserImages($teaserImages): void
{
$this->teaserImages = $teaserImages;
}
@@ -357,7 +357,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $headerImages
*/
public function setHeaderImages($headerImages)
public function setHeaderImages($headerImages): void
{
$this->headerImages = $headerImages;
}
@@ -373,17 +373,17 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $images
*/
public function setImages($images)
public function setImages($images): void
{
$this->images = $images;
}
public function addProduct(Product $product)
public function addProduct(Product $product): void
{
$this->products->attach($product);
}
public function removeProduct(Product $product)
public function removeProduct(Product $product): void
{
$this->products->detach($product);
}
@@ -399,7 +399,7 @@ class Concept extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage<Product> $products
*/
public function setProducts(ObjectStorage $products)
public function setProducts(ObjectStorage $products): void
{
$this->products = $products;
}
@@ -49,7 +49,7 @@ class Country extends AbstractDestination implements TeaserInterface
/**
* @param string $code
*/
public function setCode($code) {
public function setCode($code): void {
$this->code = $code;
}
@@ -64,17 +64,17 @@ class Country extends AbstractDestination implements TeaserInterface
/**
* @param string $descriptionExtended
*/
public function setDescriptionExtended($descriptionExtended)
public function setDescriptionExtended($descriptionExtended): void
{
$this->descriptionExtended = $descriptionExtended;
}
public function addFact(Fact $fact)
public function addFact(Fact $fact): void
{
$this->facts->attach($fact);
}
public function removeFact(Fact $factToRemove)
public function removeFact(Fact $factToRemove): void
{
$this->facts->detach($factToRemove);
}
@@ -90,7 +90,7 @@ class Country extends AbstractDestination implements TeaserInterface
/**
* @param ObjectStorage<Fact> $facts
*/
public function setFacts(ObjectStorage $facts)
public function setFacts(ObjectStorage $facts): void
{
$this->facts = $facts;
}
@@ -106,7 +106,7 @@ class Country extends AbstractDestination implements TeaserInterface
/**
* @param Officetip $officetip
*/
public function setOfficetip($officetip)
public function setOfficetip($officetip): void
{
$this->officetip = $officetip;
}
@@ -122,7 +122,7 @@ class Country extends AbstractDestination implements TeaserInterface
/**
* @param Snowreport $snowreport
*/
public function setSnowreport($snowreport)
public function setSnowreport($snowreport): void
{
$this->snowreport = $snowreport;
}
@@ -166,7 +166,7 @@ class Date extends AbstractEntity
return $this->product;
}
public function setProduct($product)
public function setProduct($product): void
{
$this->product = $product;
}
@@ -176,7 +176,7 @@ class Date extends AbstractEntity
return $this->hotel;
}
public function setHotel($hotel)
public function setHotel($hotel): void
{
$this->hotel = $hotel;
}
@@ -186,7 +186,7 @@ class Date extends AbstractEntity
return $this->country;
}
public function setCountry($country)
public function setCountry($country): void
{
$this->country = $country;
}
@@ -196,7 +196,7 @@ class Date extends AbstractEntity
return $this->region;
}
public function setRegion($region)
public function setRegion($region): void
{
$this->region = $region;
}
@@ -206,7 +206,7 @@ class Date extends AbstractEntity
return $this->city;
}
public function setCity($city)
public function setCity($city): void
{
$this->city = $city;
}
@@ -222,7 +222,7 @@ class Date extends AbstractEntity
/**
* @param int $busProId
*/
public function setBusProId($busProId)
public function setBusProId($busProId): void
{
$this->busProId = $busProId;
}
@@ -238,7 +238,7 @@ class Date extends AbstractEntity
/**
* @param int $hotelBusProId
*/
public function setHotelBusProId($hotelBusProId)
public function setHotelBusProId($hotelBusProId): void
{
$this->hotelBusProId = $hotelBusProId;
}
@@ -254,7 +254,7 @@ class Date extends AbstractEntity
/**
* @param string $code
*/
public function setCode($code)
public function setCode($code): void
{
$this->code = $code;
}
@@ -270,7 +270,7 @@ class Date extends AbstractEntity
/**
* @param bool $daytrip
*/
public function setDaytrip($daytrip)
public function setDaytrip($daytrip): void
{
$this->daytrip = $daytrip;
}
@@ -283,7 +283,7 @@ class Date extends AbstractEntity
return $this->dateStart;
}
public function setDateStart(\DateTime $dateStart)
public function setDateStart(\DateTime $dateStart): void
{
$this->dateStart = $dateStart;
}
@@ -296,7 +296,7 @@ class Date extends AbstractEntity
return $this->dateEnd;
}
public function setDateEnd(\DateTime $dateEnd)
public function setDateEnd(\DateTime $dateEnd): void
{
$this->dateEnd = $dateEnd;
}
@@ -312,7 +312,7 @@ class Date extends AbstractEntity
/**
* @param int $nights
*/
public function setNights($nights)
public function setNights($nights): void
{
$this->nights = $nights;
}
@@ -328,7 +328,7 @@ class Date extends AbstractEntity
/**
* @param string $board
*/
public function setBoard($board)
public function setBoard($board): void
{
$this->board = $board;
}
@@ -341,7 +341,7 @@ class Date extends AbstractEntity
return $this->boardCode;
}
public function setBoardCode(string $boardCode)
public function setBoardCode(string $boardCode): void
{
$this->boardCode = $boardCode;
}
@@ -354,7 +354,7 @@ class Date extends AbstractEntity
return $this->boardBusProId;
}
public function setBoardBusProId(int $boardBusProId)
public function setBoardBusProId(int $boardBusProId): void
{
$this->boardBusProId = $boardBusProId;
}
@@ -370,7 +370,7 @@ class Date extends AbstractEntity
/**
* @param bool $busIncluded
*/
public function setBusIncluded($busIncluded)
public function setBusIncluded($busIncluded): void
{
$this->busIncluded = $busIncluded;
}
@@ -386,7 +386,7 @@ class Date extends AbstractEntity
/**
* @param bool $skipassIncluded
*/
public function setSkipassIncluded($skipassIncluded)
public function setSkipassIncluded($skipassIncluded): void
{
$this->skipassIncluded = $skipassIncluded;
}
@@ -402,7 +402,7 @@ class Date extends AbstractEntity
/**
* @param bool $groupTravel
*/
public function setGroupTravel($groupTravel)
public function setGroupTravel($groupTravel): void
{
$this->groupTravel = $groupTravel;
}
@@ -418,7 +418,7 @@ class Date extends AbstractEntity
/**
* @param bool $busAvailable
*/
public function setBusAvailable($busAvailable)
public function setBusAvailable($busAvailable): void
{
$this->busAvailable = $busAvailable;
}
@@ -434,7 +434,7 @@ class Date extends AbstractEntity
/**
* @param float $busPrice
*/
public function setBusPrice($busPrice)
public function setBusPrice($busPrice): void
{
$this->busPrice = $busPrice;
}
@@ -442,12 +442,12 @@ class Date extends AbstractEntity
/**
* @return array $servicesIncluded
*/
public function getServicesIncluded()
public function getServicesIncluded(): mixed
{
return unserialize($this->servicesIncluded);
}
public function setServicesIncluded(array $servicesIncluded)
public function setServicesIncluded(array $servicesIncluded): void
{
$this->servicesIncluded = serialize($servicesIncluded);
}
@@ -466,17 +466,17 @@ class Date extends AbstractEntity
return $services;
}
public function setServicesGeneral(array $servicesGeneral)
public function setServicesGeneral(array $servicesGeneral): void
{
$this->servicesGeneral = serialize($servicesGeneral);
}
public function getCoursesIncluded()
public function getCoursesIncluded(): mixed
{
return unserialize($this->coursesIncluded);
}
public function setCoursesIncluded($coursesIncluded)
public function setCoursesIncluded($coursesIncluded): void
{
$this->coursesIncluded = $coursesIncluded;
}
@@ -486,7 +486,7 @@ class Date extends AbstractEntity
return $this->getServicesGeneral('KUR');
}
public function getGuide()
public function getGuide(): mixed
{
return unserialize($this->guide);
}
@@ -499,12 +499,12 @@ class Date extends AbstractEntity
/**
* @return string
*/
public function getPickups()
public function getPickups(): mixed
{
return unserialize($this->pickups);
}
public function setPickups(array $pickups)
public function setPickups(array $pickups): void
{
$this->pickups = serialize($pickups);
}
@@ -519,7 +519,7 @@ class Date extends AbstractEntity
/**
* @param float $discount
*/
public function setDiscount($discount) {
public function setDiscount($discount): void {
$this->discount = $discount;
}
@@ -534,7 +534,7 @@ class Date extends AbstractEntity
/**
* @param float $minPrice
*/
public function setMinPrice($minPrice)
public function setMinPrice($minPrice): void
{
$this->minPrice = $minPrice;
}
@@ -550,7 +550,7 @@ class Date extends AbstractEntity
/**
* @param float $pseudoPrice
*/
public function setPseudoPrice($pseudoPrice)
public function setPseudoPrice($pseudoPrice): void
{
$this->pseudoPrice = $pseudoPrice;
}
@@ -566,7 +566,7 @@ class Date extends AbstractEntity
/**
* @param int $available
*/
public function setAvailable($available)
public function setAvailable($available): void
{
$this->available = $available;
}
@@ -576,7 +576,7 @@ class Date extends AbstractEntity
return $this->minPax;
}
public function setMinPax($minPax)
public function setMinPax($minPax): static
{
$this->minPax = $minPax;
@@ -588,7 +588,7 @@ class Date extends AbstractEntity
return $this->new;
}
public function setNew(bool $new)
public function setNew(bool $new): void
{
$this->new = $new;
}
@@ -21,20 +21,14 @@ class FilterOptions implements \JsonSerializable
*/
private $priceRanges = [];
/**
* @var array
*/
private $destinations = [];
private array $destinations = [];
/**
* @var array
*/
private $concepts = [];
/**
* @var array
*/
private $pax = [];
private array $pax;
/**
* @var array
@@ -71,15 +65,9 @@ class FilterOptions implements \JsonSerializable
*/
private $busAvailable;
/**
* @var int
*/
private $resultCount;
private ?int $resultCount = null;
/**
* @var string
*/
private $resultsUri;
private ?string $resultsUri = null;
public function __construct()
{
@@ -100,7 +88,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param array $priceRanges
*/
public function setPriceRanges($priceRanges)
public function setPriceRanges($priceRanges): void
{
$this->priceRanges = $priceRanges;
}
@@ -113,7 +101,7 @@ class FilterOptions implements \JsonSerializable
return $this->destinations;
}
public function setDestinations(array $destinations)
public function setDestinations(array $destinations): void
{
$this->destinations = $destinations;
}
@@ -129,7 +117,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param array $concepts
*/
public function setConcepts($concepts)
public function setConcepts($concepts): void
{
$this->concepts = $concepts;
}
@@ -145,7 +133,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param array $pax
*/
public function setPax($pax)
public function setPax($pax): void
{
$this->pax = $pax;
}
@@ -161,7 +149,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param array $nights
*/
public function setNights($nights)
public function setNights($nights): void
{
$this->nights = $nights;
}
@@ -177,7 +165,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param array $hotelTypes
*/
public function setHotelTypes($hotelTypes)
public function setHotelTypes($hotelTypes): void
{
$this->hotelTypes = $hotelTypes;
}
@@ -193,7 +181,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param array $boardTypes
*/
public function setBoardTypes($boardTypes)
public function setBoardTypes($boardTypes): void
{
$this->boardTypes = $boardTypes;
}
@@ -209,7 +197,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param array $roomTypes
*/
public function setRoomTypes($roomTypes)
public function setRoomTypes($roomTypes): void
{
$this->roomTypes = $roomTypes;
}
@@ -225,7 +213,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param \DateTime $dateFrom
*/
public function setDateFrom($dateFrom)
public function setDateFrom($dateFrom): void
{
$this->dateFrom = $dateFrom;
}
@@ -241,7 +229,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param \DateTime $dateTo
*/
public function setDateTo($dateTo)
public function setDateTo($dateTo): void
{
$this->dateTo = $dateTo;
}
@@ -257,7 +245,7 @@ class FilterOptions implements \JsonSerializable
/**
* @param bool $busAvailable
*/
public function setBusAvailable($busAvailable)
public function setBusAvailable($busAvailable): void
{
$this->busAvailable = $busAvailable;
}
@@ -270,7 +258,7 @@ class FilterOptions implements \JsonSerializable
return $this->resultCount;
}
public function setResultCount(int $resultCount)
public function setResultCount(int $resultCount): void
{
$this->resultCount = $resultCount;
}
@@ -283,7 +271,7 @@ class FilterOptions implements \JsonSerializable
return $this->resultsUri;
}
public function setResultsUri(string $resultsUri)
public function setResultsUri(string $resultsUri): void
{
$this->resultsUri = $resultsUri;
}
@@ -98,7 +98,7 @@ class NewsletterSubscriptionRequest implements JsonSerializable
'firstName' => $this->firstName,
'lastName' => $this->lastName,
'email' => $this->email,
'listIds' => array_map(fn($value) => (int) $value, $this->listIds),
'listIds' => array_map(fn($value): int => (int) $value, $this->listIds),
];
}
}
@@ -35,7 +35,7 @@ class Fact extends AbstractEntity
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -51,7 +51,7 @@ class Fact extends AbstractEntity
/**
* @param string $keywords
*/
public function setKeywords($keywords)
public function setKeywords($keywords): void
{
$this->keywords = $keywords;
}
@@ -67,7 +67,7 @@ class Fact extends AbstractEntity
/**
* @param string $label
*/
public function setLabel($label)
public function setLabel($label): void
{
$this->label = $label;
}
@@ -30,7 +30,7 @@ class Faq extends AbstractEntity
/**
* @param string $question
*/
public function setQuestion($question)
public function setQuestion($question): void
{
$this->question = $question;
}
@@ -46,7 +46,7 @@ class Faq extends AbstractEntity
/**
* @param string $answer
*/
public function setAnswer($answer)
public function setAnswer($answer): void
{
$this->answer = $answer;
}
@@ -343,7 +343,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param bool $hidden
*/
public function setHidden($hidden)
public function setHidden($hidden): void
{
$this->hidden = $hidden;
}
@@ -359,7 +359,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param bool $earlybird
*/
public function setEarlybird($earlybird)
public function setEarlybird($earlybird): void
{
$this->earlybird = $earlybird;
}
@@ -375,7 +375,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param bool $new
*/
public function setNew($new)
public function setNew($new): void
{
$this->new = $new;
}
@@ -391,7 +391,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param bool $lowContingent
*/
public function setLowContingent($lowContingent)
public function setLowContingent($lowContingent): void
{
$this->lowContingent = $lowContingent;
}
@@ -407,7 +407,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param bool $showAsTeaser
*/
public function setShowAsTeaser($showAsTeaser)
public function setShowAsTeaser($showAsTeaser): void
{
$this->showAsTeaser = $showAsTeaser;
}
@@ -423,7 +423,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $detailPage
*/
public function setDetailPage($detailPage)
public function setDetailPage($detailPage): void
{
$this->detailPage = $detailPage;
}
@@ -439,7 +439,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -459,7 +459,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $shortName
*/
public function setShortName($shortName)
public function setShortName($shortName): void
{
$this->shortName = $shortName;
}
@@ -475,7 +475,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $keywords
*/
public function setKeywords($keywords)
public function setKeywords($keywords): void
{
$this->keywords = $keywords;
}
@@ -490,7 +490,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $headline
*/
public function setHeadline($headline) {
public function setHeadline($headline): void {
$this->headline = $headline;
}
@@ -504,7 +504,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $teaser
*/
public function setTeaser($teaser) {
public function setTeaser($teaser): void {
$this->teaser = $teaser;
}
@@ -519,7 +519,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $headerTitle
*/
public function setHeaderTitle($headerTitle)
public function setHeaderTitle($headerTitle): void
{
$this->headerTitle = $headerTitle;
}
@@ -535,7 +535,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $headerSubtitle
*/
public function setHeaderSubtitle($headerSubtitle)
public function setHeaderSubtitle($headerSubtitle): void
{
$this->headerSubtitle = $headerSubtitle;
}
@@ -551,7 +551,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $description
*/
public function setDescription($description)
public function setDescription($description): void
{
$this->description = $description;
}
@@ -566,7 +566,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $features
*/
public function setFeatures($features) {
public function setFeatures($features): void {
$this->features = $features;
}
@@ -580,7 +580,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $roomTypes
*/
public function setRoomTypes($roomTypes) {
public function setRoomTypes($roomTypes): void {
$this->roomTypes = $roomTypes;
}
@@ -594,7 +594,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $additionalInformation
*/
public function setAdditionalInformation($additionalInformation) {
public function setAdditionalInformation($additionalInformation): void {
$this->additionalInformation = $additionalInformation;
}
@@ -613,7 +613,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param float $latitude
*/
public function setLatitude($latitude)
public function setLatitude($latitude): void
{
$this->latitude = $latitude;
}
@@ -633,7 +633,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param float $longitude
*/
public function setLongitude($longitude)
public function setLongitude($longitude): void
{
$this->longitude = $longitude;
}
@@ -649,7 +649,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $address
*/
public function setAddress($address)
public function setAddress($address): void
{
$this->address = $address;
}
@@ -662,7 +662,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->images;
}
public function setImages(ObjectStorage $images)
public function setImages(ObjectStorage $images): void
{
$this->images = $images;
}
@@ -678,7 +678,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $resellerImages
*/
public function setResellerImages($resellerImages)
public function setResellerImages($resellerImages): void
{
$this->resellerImages = $resellerImages;
}
@@ -694,7 +694,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @return null|ObjectStorage
*/
public function getTeaserImage()
public function getTeaserImage(): null|FileReference|false
{
if ($this->teaserImages->count() === 0) {
return null;
@@ -708,7 +708,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $teaserImages
*/
public function setTeaserImages($teaserImages)
public function setTeaserImages($teaserImages): void
{
$this->teaserImages = $teaserImages;
}
@@ -730,7 +730,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @return null|ObjectStorage
*/
public function getHeaderImage()
public function getHeaderImage(): null|FileReference|false
{
if ($this->headerImages->count() === 0) {
return null;
@@ -744,7 +744,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $headerImages
*/
public function setHeaderImages($headerImages)
public function setHeaderImages($headerImages): void
{
$this->headerImages = $headerImages;
}
@@ -760,17 +760,17 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $code
*/
public function setCode($code)
public function setCode($code): void
{
$this->code = $code;
}
public function addAdditionalCode(MatchCode $code)
public function addAdditionalCode(MatchCode $code): void
{
$this->additionalCodes->attach($code);
}
public function removeAdditionalCodes(MatchCode $codeToRemove)
public function removeAdditionalCodes(MatchCode $codeToRemove): void
{
$this->additionalCodes->detach($codeToRemove);
}
@@ -783,7 +783,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->additionalCodes;
}
public function setAdditionalCodes(ObjectStorage $codes)
public function setAdditionalCodes(ObjectStorage $codes): void
{
$this->additionalCodes = $codes;
}
@@ -799,7 +799,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param int $type
*/
public function setType($type)
public function setType($type): void
{
$this->type = $type;
}
@@ -827,7 +827,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param int $category
*/
public function setCategory($category)
public function setCategory($category): void
{
$this->category = $category;
}
@@ -840,7 +840,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->country;
}
public function setCountry(Country $country)
public function setCountry(Country $country): void
{
$this->country = $country;
}
@@ -853,7 +853,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->region;
}
public function setRegion(Region $region)
public function setRegion(Region $region): void
{
$this->region = $region;
}
@@ -866,12 +866,12 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->city;
}
public function setCity(City $city)
public function setCity(City $city): void
{
$this->city = $city;
}
public function addTeamer(Teammember $teamer)
public function addTeamer(Teammember $teamer): void
{
$this->teamer->attach($teamer);
}
@@ -879,7 +879,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param Teammember $teamerToRemove The Teammember to be removed
*/
public function removeTeamer(Teammember $teamerToRemove)
public function removeTeamer(Teammember $teamerToRemove): void
{
$this->teamer->detach($teamerToRemove);
}
@@ -892,17 +892,17 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->teamer;
}
public function setTeamer(ObjectStorage $teamer)
public function setTeamer(ObjectStorage $teamer): void
{
$this->teamer = $teamer;
}
public function addProduct(Product $product)
public function addProduct(Product $product): void
{
$this->products->attach($product);
}
public function removeProduct(Product $product)
public function removeProduct(Product $product): void
{
$this->products->detach($product);
}
@@ -915,17 +915,17 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->products;
}
public function setProducts(ObjectStorage $products)
public function setProducts(ObjectStorage $products): void
{
$this->products = $products;
}
public function addFact(Fact $fact)
public function addFact(Fact $fact): void
{
$this->facts->attach($fact);
}
public function removeFact(Fact $factToRemove)
public function removeFact(Fact $factToRemove): void
{
$this->facts->detach($factToRemove);
}
@@ -938,7 +938,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->facts;
}
public function setFacts(ObjectStorage $facts)
public function setFacts(ObjectStorage $facts): void
{
$this->facts = $facts;
}
@@ -962,31 +962,22 @@ class Hotel extends AbstractEntity implements TeaserInterface
/**
* @param string $externalLink
*/
public function setExternalLink($externalLink)
public function setExternalLink($externalLink): void
{
$this->externalLink = $externalLink;
}
/**
* @return bool
*/
public function getIsApartment()
public function getIsApartment(): bool
{
return $this->getType() === self::TYPE_APPARTMENT;
}
/**
* @return bool
*/
public function getIsHolidayFlat()
public function getIsHolidayFlat(): bool
{
return $this->getType() === self::TYPE_HOLIDAY_FLAT;
}
/**
* @return bool
*/
public function getIsOther()
public function getIsOther(): bool
{
return !$this->getIsApartment() && !$this->getIsHolidayFlat();
}
@@ -999,7 +990,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->groupsPriceConfigs;
}
public function setGroupsPriceConfigs(ObjectStorage $groupPriceConfigs)
public function setGroupsPriceConfigs(ObjectStorage $groupPriceConfigs): void
{
$this->groupsPriceConfigs = $groupPriceConfigs;
}
@@ -1012,7 +1003,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->groupsPriceOptions;
}
public function setGroupsPriceOptions(ObjectStorage $groupsPriceOptions)
public function setGroupsPriceOptions(ObjectStorage $groupsPriceOptions): void
{
$this->groupsPriceOptions = $groupsPriceOptions;
}
@@ -1025,7 +1016,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->groupsPriceBoards;
}
public function setGroupsPriceBoards(ObjectStorage $groupsPriceBoards)
public function setGroupsPriceBoards(ObjectStorage $groupsPriceBoards): void
{
$this->groupsPriceBoards = $groupsPriceBoards;
}
@@ -1035,7 +1026,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->groupsPriceAdolescentsAge;
}
public function setGroupsPriceAdolescentsAge($groupsPriceAdolescentsAge)
public function setGroupsPriceAdolescentsAge($groupsPriceAdolescentsAge): void
{
$this->groupsPriceAdolescentsAge = $groupsPriceAdolescentsAge;
}
@@ -1045,7 +1036,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->groupsPriceTaxLabel;
}
public function setGroupsPriceTaxLabel($groupsPriceTaxLabel)
public function setGroupsPriceTaxLabel($groupsPriceTaxLabel): void
{
$this->groupsPriceTaxLabel = $groupsPriceTaxLabel;
}
@@ -1055,7 +1046,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->mainSeasonFrom;
}
public function setMainSeasonFrom(\DateTime $mainSeasonFrom)
public function setMainSeasonFrom(\DateTime $mainSeasonFrom): void
{
$this->mainSeasonFrom = $mainSeasonFrom;
}
@@ -1065,7 +1056,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->mainSeasonTo;
}
public function setMainSeasonTo(\DateTime $mainSeasonTo)
public function setMainSeasonTo(\DateTime $mainSeasonTo): void
{
$this->mainSeasonTo = $mainSeasonTo;
}
@@ -1075,7 +1066,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->bedsCount;
}
public function setBedsCount($bedsCount)
public function setBedsCount($bedsCount): void
{
$this->bedsCount = $bedsCount;
}
@@ -1085,7 +1076,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->parkingCount;
}
public function setParkingCount($parkingCount)
public function setParkingCount($parkingCount): void
{
$this->parkingCount = $parkingCount;
}
@@ -1095,7 +1086,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->altitude;
}
public function setAltitude($altitude)
public function setAltitude($altitude): void
{
$this->altitude = $altitude;
}
@@ -1105,7 +1096,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->shower;
}
public function setShower($shower)
public function setShower($shower): void
{
$this->shower = $shower;
}
@@ -1115,7 +1106,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->partyroom;
}
public function setPartyroom($partyroom)
public function setPartyroom($partyroom): void
{
$this->partyroom = $partyroom;
}
@@ -1125,7 +1116,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->gamesroom;
}
public function setGamesroom($gamesroom)
public function setGamesroom($gamesroom): void
{
$this->gamesroom = $gamesroom;
}
@@ -1135,7 +1126,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->sauna;
}
public function setSauna($sauna)
public function setSauna($sauna): void
{
$this->sauna = $sauna;
}
@@ -1145,7 +1136,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->wifi;
}
public function setWifi($wifi)
public function setWifi($wifi): void
{
$this->wifi = $wifi;
}
@@ -1155,7 +1146,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->distanceBus;
}
public function setDistanceBus($distanceBus)
public function setDistanceBus($distanceBus): void
{
$this->distanceBus = $distanceBus;
}
@@ -1165,7 +1156,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
return $this->distanceLift;
}
public function setDistanceLift($distanceLift)
public function setDistanceLift($distanceLift): void
{
$this->distanceLift = $distanceLift;
}
@@ -35,7 +35,7 @@ class Infobox extends AbstractEntity
/**
* @param string $title
*/
public function setTitle($title)
public function setTitle($title): void
{
$this->title = $title;
}
@@ -51,7 +51,7 @@ class Infobox extends AbstractEntity
/**
* @param string $text
*/
public function setText($text)
public function setText($text): void
{
$this->text = $text;
}
@@ -67,7 +67,7 @@ class Infobox extends AbstractEntity
/**
* @param bool $defaultText
*/
public function setDefaultText($defaultText)
public function setDefaultText($defaultText): void
{
$this->defaultText = $defaultText;
}
@@ -41,7 +41,7 @@ class Journey extends AbstractEntity
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -57,7 +57,7 @@ class Journey extends AbstractEntity
/**
* @param string $byCar
*/
public function setByCar($byCar)
public function setByCar($byCar): void
{
$this->byCar = $byCar;
}
@@ -73,7 +73,7 @@ class Journey extends AbstractEntity
/**
* @param string $byBus
*/
public function setByBus($byBus)
public function setByBus($byBus): void
{
$this->byBus = $byBus;
}
@@ -89,7 +89,7 @@ class Journey extends AbstractEntity
/**
* @param FileReference $image
*/
public function setImage($image)
public function setImage($image): void
{
$this->image = $image;
}
@@ -25,7 +25,7 @@ class MatchCode extends AbstractEntity
/**
* @param string $code
*/
public function setCode($code)
public function setCode($code): void
{
$this->code = $code;
}
@@ -35,7 +35,7 @@ class Officetip extends AbstractEntity
/**
* @param string $label
*/
public function setLabel($label)
public function setLabel($label): void
{
$this->label = $label;
}
@@ -51,7 +51,7 @@ class Officetip extends AbstractEntity
/**
* @param string $text
*/
public function setText($text)
public function setText($text): void
{
$this->text = $text;
}
@@ -64,7 +64,7 @@ class Officetip extends AbstractEntity
return $this->author;
}
public function setAuthor(Teammember $author)
public function setAuthor(Teammember $author): void
{
$this->author = $author;
}
@@ -305,15 +305,12 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param bool $searchable
*/
public function setSearchable($searchable)
public function setSearchable($searchable): void
{
$this->searchable = (bool) $searchable;
}
/**
* @return boolean
*/
public function getBookable()
public function getBookable(): bool
{
return (bool) $this->bookable;
}
@@ -321,7 +318,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param boolean $bookable
*/
public function setBookable($bookable)
public function setBookable($bookable): void
{
$this->bookable = (bool) $bookable;
}
@@ -337,15 +334,12 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param bool $hideBookingButton
*/
public function setHideBookingButton($hideBookingButton)
public function setHideBookingButton($hideBookingButton): void
{
$this->hideBookingButton = (bool) $hideBookingButton;
}
/**
* @return bool
*/
public function isDaytrip()
public function isDaytrip(): bool
{
return (bool) $this->daytrip;
}
@@ -353,7 +347,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param bool $daytrip
*/
public function setDaytrip($daytrip)
public function setDaytrip($daytrip): void
{
$this->daytrip = (bool) $daytrip;
}
@@ -369,7 +363,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param bool $important
*/
public function setImportant($important)
public function setImportant($important): void
{
$this->important = $important;
}
@@ -385,7 +379,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param bool $skipassIncluded
*/
public function setSkipassIncluded($skipassIncluded)
public function setSkipassIncluded($skipassIncluded): void
{
$this->skipassIncluded = $skipassIncluded;
}
@@ -400,7 +394,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $detailPage
*/
public function setDetailPage($detailPage) {
public function setDetailPage($detailPage): void {
$this->detailPage = $detailPage;
}
@@ -415,7 +409,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $externalLink
*/
public function setExternalLink($externalLink)
public function setExternalLink($externalLink): void
{
$this->externalLink = $externalLink;
}
@@ -431,7 +425,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -447,7 +441,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $nameInternal
*/
public function setNameInternal($nameInternal)
public function setNameInternal($nameInternal): void
{
$this->nameInternal = $nameInternal;
}
@@ -463,7 +457,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $keywords
*/
public function setKeywords($keywords)
public function setKeywords($keywords): void
{
$this->keywords = $keywords;
}
@@ -478,7 +472,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $headline
*/
public function setHeadline($headline) {
public function setHeadline($headline): void {
$this->headline = $headline;
}
@@ -493,7 +487,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param int $busProId
*/
public function setBusProId($busProId)
public function setBusProId($busProId): void
{
$this->busProId = $busProId;
}
@@ -509,7 +503,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $code
*/
public function setCode($code)
public function setCode($code): void
{
$this->code = $code;
}
@@ -525,7 +519,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $season
*/
public function setSeason($season)
public function setSeason($season): void
{
$this->season = $season;
}
@@ -541,7 +535,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $feature
*/
public function setFeature($feature)
public function setFeature($feature): void
{
$this->feature = $feature;
}
@@ -556,7 +550,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $teaser
*/
public function setTeaser($teaser) {
public function setTeaser($teaser): void {
$this->teaser = $teaser;
}
@@ -571,7 +565,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $teaserLong
*/
public function setTeaserLong($teaserLong)
public function setTeaserLong($teaserLong): void
{
$this->teaserLong = $teaserLong;
}
@@ -587,7 +581,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $headerTitle
*/
public function setHeaderTitle($headerTitle)
public function setHeaderTitle($headerTitle): void
{
$this->headerTitle = $headerTitle;
}
@@ -603,7 +597,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $headerSubtitle
*/
public function setHeaderSubtitle($headerSubtitle)
public function setHeaderSubtitle($headerSubtitle): void
{
$this->headerSubtitle = $headerSubtitle;
}
@@ -618,7 +612,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $conceptDescription
*/
public function setConceptDescription($conceptDescription) {
public function setConceptDescription($conceptDescription): void {
$this->conceptDescription = $conceptDescription;
}
@@ -632,7 +626,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $boardDescription
*/
public function setBoardDescription($boardDescription) {
public function setBoardDescription($boardDescription): void {
$this->boardDescription = $boardDescription;
}
@@ -646,7 +640,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $additionalServices
*/
public function setAdditionalServices($additionalServices) {
public function setAdditionalServices($additionalServices): void {
$this->additionalServices = $additionalServices;
}
@@ -661,7 +655,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $includedServices
*/
public function setIncludedServices($includedServices)
public function setIncludedServices($includedServices): void
{
$this->includedServices = $includedServices;
}
@@ -676,7 +670,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $programmeDescription
*/
public function setProgrammeDescription($programmeDescription) {
public function setProgrammeDescription($programmeDescription): void {
$this->programmeDescription = $programmeDescription;
}
@@ -691,7 +685,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $skiPassAltTitle
*/
public function setSkiPassAltTitle($skiPassAltTitle)
public function setSkiPassAltTitle($skiPassAltTitle): void
{
$this->skiPassAltTitle = $skiPassAltTitle;
}
@@ -706,7 +700,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $skiPassDescription
*/
public function setSkiPassDescription($skiPassDescription) {
public function setSkiPassDescription($skiPassDescription): void {
$this->skiPassDescription = $skiPassDescription;
}
@@ -721,7 +715,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param float $ratingAverage
*/
public function setRatingAverage($ratingAverage)
public function setRatingAverage($ratingAverage): void
{
$this->ratingAverage = $ratingAverage;
}
@@ -737,7 +731,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param int $ratingVotesCount
*/
public function setRatingVotesCount($ratingVotesCount)
public function setRatingVotesCount($ratingVotesCount): void
{
$this->ratingVotesCount = $ratingVotesCount;
}
@@ -753,7 +747,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $testimonials
*/
public function setTestimonials($testimonials)
public function setTestimonials($testimonials): void
{
$this->testimonials = $testimonials;
}
@@ -769,7 +763,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage<FileReference> $images
*/
public function setImages(ObjectStorage $images)
public function setImages(ObjectStorage $images): void
{
$this->images = $images;
}
@@ -789,7 +783,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage<FileReference> $images
*/
public function setResellerImages(ObjectStorage $images)
public function setResellerImages(ObjectStorage $images): void
{
$this->resellerImages = $images;
}
@@ -820,7 +814,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $teaserImages
*/
public function setTeaserImages($teaserImages)
public function setTeaserImages($teaserImages): void
{
$this->teaserImages = $teaserImages;
}
@@ -863,7 +857,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage $headerImages
*/
public function setHeaderImages($headerImages)
public function setHeaderImages($headerImages): void
{
$this->headerImages = $headerImages;
}
@@ -876,7 +870,7 @@ class Product extends AbstractEntity implements TeaserInterface
return $this->concept;
}
public function setConcepts(Concept $concept)
public function setConcepts(Concept $concept): void
{
$this->concept = $concept;
}
@@ -889,7 +883,7 @@ class Product extends AbstractEntity implements TeaserInterface
return $this->country;
}
public function setCountry(Country $country)
public function setCountry(Country $country): void
{
$this->country = $country;
}
@@ -902,7 +896,7 @@ class Product extends AbstractEntity implements TeaserInterface
return $this->region;
}
public function setRegion(Region $region)
public function setRegion(Region $region): void
{
$this->region = $region;
}
@@ -915,7 +909,7 @@ class Product extends AbstractEntity implements TeaserInterface
return $this->city;
}
public function setCity(City $city)
public function setCity(City $city): void
{
$this->city = $city;
}
@@ -931,7 +925,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param Journey $journey
*/
public function setJourney($journey)
public function setJourney($journey): void
{
$this->journey = $journey;
}
@@ -947,17 +941,17 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage<Fact> $facts
*/
public function setFacts(ObjectStorage $facts)
public function setFacts(ObjectStorage $facts): void
{
$this->facts = $facts;
}
public function addHotel(Hotel $hotel)
public function addHotel(Hotel $hotel): void
{
$this->hotels->attach($hotel);
}
public function removeHotel(Hotel $hotel)
public function removeHotel(Hotel $hotel): void
{
$this->hotels->detach($hotel);
}
@@ -973,7 +967,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage<Hotel> $hotels
*/
public function setHotels(ObjectStorage $hotels)
public function setHotels(ObjectStorage $hotels): void
{
$this->hotels = $hotels;
}
@@ -988,7 +982,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param ObjectStorage<Faq> $faq
*/
public function setFaqs(ObjectStorage $faqs)
public function setFaqs(ObjectStorage $faqs): void
{
$this->faqs = $faqs;
}
@@ -1004,7 +998,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param Officetip $officetip
*/
public function setOfficetip($officetip)
public function setOfficetip($officetip): void
{
$this->officetip = $officetip;
}
@@ -1020,7 +1014,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param Hotel $calendarHotel
*/
public function setCalendarHotel($calendarHotel)
public function setCalendarHotel($calendarHotel): void
{
$this->calendarHotel = $calendarHotel;
}
@@ -1036,7 +1030,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param Product $altProduct
*/
public function setAltProduct($altProduct)
public function setAltProduct($altProduct): void
{
$this->altProduct = $altProduct;
}
@@ -1052,7 +1046,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $altLabel
*/
public function setAltLabel($altLabel)
public function setAltLabel($altLabel): void
{
$this->altLabel = $altLabel;
}
@@ -1068,7 +1062,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param string $video
*/
public function setVideo($video)
public function setVideo($video): void
{
$this->video = $video;
}
@@ -1084,7 +1078,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param FileReference $banner
*/
public function setBanner($banner)
public function setBanner($banner): void
{
$this->banner = $banner;
}
@@ -1100,7 +1094,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param Badge $badge
*/
public function setBadge($badge)
public function setBadge($badge): void
{
$this->badge = $badge;
}
@@ -1121,7 +1115,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param int $minPrice
*/
public function setMinPrice($minPrice)
public function setMinPrice($minPrice): void
{
$this->minPrice = $minPrice;
}
@@ -1137,7 +1131,7 @@ class Product extends AbstractEntity implements TeaserInterface
/**
* @param Infobox $nonBookableInfo
*/
public function setNonBookableInfo($nonBookableInfo)
public function setNonBookableInfo($nonBookableInfo): void
{
$this->nonBookableInfo = $nonBookableInfo;
}
@@ -1147,7 +1141,7 @@ class Product extends AbstractEntity implements TeaserInterface
return $this->tourThumbnail;
}
public function setTourThumbnail(FileReference $tourThumbnail)
public function setTourThumbnail(FileReference $tourThumbnail): void
{
$this->tourThumbnail = $tourThumbnail;
}
@@ -1157,7 +1151,7 @@ class Product extends AbstractEntity implements TeaserInterface
return $this->tourLink;
}
public function setTourLink(string $tourLink)
public function setTourLink(string $tourLink): void
{
$this->tourLink = $tourLink;
}
@@ -133,7 +133,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param bool $excludeFromTeasergroups
*/
public function setExcludeFromTeasergroups($excludeFromTeasergroups)
public function setExcludeFromTeasergroups($excludeFromTeasergroups): void
{
$this->excludeFromTeasergroups = (bool) $excludeFromTeasergroups;
}
@@ -148,7 +148,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $skiArea
*/
public function setSkiArea($skiArea) {
public function setSkiArea($skiArea): void {
$this->skiArea = $skiArea;
}
@@ -163,7 +163,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $skiAreaExtended
*/
public function setSkiAreaExtended($skiAreaExtended)
public function setSkiAreaExtended($skiAreaExtended): void
{
$this->skiAreaExtended = $skiAreaExtended;
}
@@ -178,7 +178,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $skiPass
*/
public function setSkiPass($skiPass) {
public function setSkiPass($skiPass): void {
$this->skiPass = $skiPass;
}
@@ -192,7 +192,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $news
*/
public function setNews($news) {
public function setNews($news): void {
$this->news = $news;
}
@@ -206,7 +206,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $length
*/
public function setLength($length) {
public function setLength($length): void {
$this->length = $length;
}
@@ -220,7 +220,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $height
*/
public function setHeight($height) {
public function setHeight($height): void {
$this->height = $height;
}
@@ -234,7 +234,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $lifts
*/
public function setLifts($lifts) {
public function setLifts($lifts): void {
$this->lifts = $lifts;
}
@@ -249,7 +249,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $feature
*/
public function setFeature($feature)
public function setFeature($feature): void
{
$this->feature = $feature;
}
@@ -279,7 +279,7 @@ class Region extends AbstractDestination implements TeaserInterface
return $this->country;
}
public function setCountry(Country $country)
public function setCountry(Country $country): void
{
$this->country = $country;
}
@@ -294,7 +294,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param ObjectStorage $cities
*/
public function setCities($cities) {
public function setCities($cities): void {
$this->cities = $cities;
}
@@ -308,7 +308,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param ObjectStorage $products
*/
public function setProducts($products) {
public function setProducts($products): void {
$this->products = $products;
}
@@ -325,7 +325,7 @@ class Region extends AbstractDestination implements TeaserInterface
*
* @param ObjectStorage<Fact> $facts
*/
public function setFacts(ObjectStorage $facts)
public function setFacts(ObjectStorage $facts): void
{
$this->facts = $facts;
}
@@ -340,7 +340,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param ObjectStorage $hotels
*/
public function setHotels($hotels) {
public function setHotels($hotels): void {
$this->hotels = $hotels;
}
@@ -355,7 +355,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param Snowreport $snowreport
*/
public function setSnowreport($snowreport)
public function setSnowreport($snowreport): void
{
$this->snowreport = $snowreport;
}
@@ -368,10 +368,7 @@ class Region extends AbstractDestination implements TeaserInterface
return $this->webcam;
}
/**
* @return bool
*/
public function getWebcamAvailable()
public function getWebcamAvailable(): bool
{
$webcam = $this->getWebcam();
return $webcam !== null && $webcam->getAvailable();
@@ -380,7 +377,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param Webcam $webcam
*/
public function setWebcam($webcam)
public function setWebcam($webcam): void
{
$this->webcam = $webcam;
}
@@ -396,7 +393,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
*/
public function setRegionMaps($regionMaps)
public function setRegionMaps($regionMaps): void
{
$this->regionMaps = $regionMaps;
}
@@ -412,7 +409,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param FileReference $awardImage
*/
public function setAwardImage($awardImage)
public function setAwardImage($awardImage): void
{
$this->awardImage = $awardImage;
}
@@ -428,7 +425,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $awardLink
*/
public function setAwardLink($awardLink)
public function setAwardLink($awardLink): void
{
$this->awardLink = $awardLink;
}
@@ -444,7 +441,7 @@ class Region extends AbstractDestination implements TeaserInterface
/**
* @param string $awardLabel
*/
public function setAwardLabel($awardLabel)
public function setAwardLabel($awardLabel): void
{
$this->awardLabel = $awardLabel;
}
@@ -46,7 +46,7 @@ class Reseller extends AbstractEntity
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -62,7 +62,7 @@ class Reseller extends AbstractEntity
/**
* @param string $code
*/
public function setCode($code)
public function setCode($code): void
{
$this->code = $code;
}
@@ -78,7 +78,7 @@ class Reseller extends AbstractEntity
/**
* @param string $paCode
*/
public function setPaCode($paCode)
public function setPaCode($paCode): void
{
$this->paCode = $paCode;
}
@@ -94,7 +94,7 @@ class Reseller extends AbstractEntity
/**
* @param ObjectStorage $products
*/
public function setProducts($products)
public function setProducts($products): void
{
$this->products = $products;
}
@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace EP\EpProducts\Domain\Model;
class SearchResult
@@ -23,23 +25,17 @@ class SearchResult
/**
* @param int $total
*/
public function setTotal($total)
public function setTotal($total): void
{
$this->total = $total;
}
/**
* @return array
*/
public function getData()
public function getData(): array
{
return $this->data;
}
/**
* @param array $data
*/
public function setData($data)
public function setData(array $data): void
{
$this->data = $data;
}
@@ -104,7 +104,7 @@ class Snowreport extends AbstractEntity
/**
* @param int $vendorUid
*/
public function setVendorUid($vendorUid)
public function setVendorUid($vendorUid): void
{
$this->vendorUid = $vendorUid;
}
@@ -120,7 +120,7 @@ class Snowreport extends AbstractEntity
/**
* @param string $regionName
*/
public function setRegionName($regionName)
public function setRegionName($regionName): void
{
$this->regionName = $regionName;
}
@@ -136,7 +136,7 @@ class Snowreport extends AbstractEntity
/**
* @param bool $glacier
*/
public function setGlacier($glacier)
public function setGlacier($glacier): void
{
$this->glacier = $glacier;
}
@@ -152,7 +152,7 @@ class Snowreport extends AbstractEntity
/**
* @param int $heightMax
*/
public function setHeightMax($heightMax)
public function setHeightMax($heightMax): void
{
$this->heightMax = $heightMax;
}
@@ -168,7 +168,7 @@ class Snowreport extends AbstractEntity
/**
* @param int $heightMin
*/
public function setHeightMin($heightMin)
public function setHeightMin($heightMin): void
{
$this->heightMin = $heightMin;
}
@@ -184,7 +184,7 @@ class Snowreport extends AbstractEntity
/**
* @param bool $opened
*/
public function setOpened($opened)
public function setOpened($opened): void
{
$this->opened = $opened;
}
@@ -200,7 +200,7 @@ class Snowreport extends AbstractEntity
/**
* @param int $snowLevelMountain
*/
public function setSnowLevelMountain($snowLevelMountain)
public function setSnowLevelMountain($snowLevelMountain): void
{
$this->snowLevelMountain = $snowLevelMountain;
}
@@ -216,7 +216,7 @@ class Snowreport extends AbstractEntity
/**
* @param int $snowLevelValley
*/
public function setSnowLevelValley($snowLevelValley)
public function setSnowLevelValley($snowLevelValley): void
{
$this->snowLevelValley = $snowLevelValley;
}
@@ -232,7 +232,7 @@ class Snowreport extends AbstractEntity
/**
* @param string $snowQuality
*/
public function setSnowQuality($snowQuality)
public function setSnowQuality($snowQuality): void
{
$this->snowQuality = $snowQuality;
}
@@ -248,15 +248,12 @@ class Snowreport extends AbstractEntity
/**
* @param \DateTime $lastSnowfall
*/
public function setLastSnowfall($lastSnowfall)
public function setLastSnowfall($lastSnowfall): void
{
$this->lastSnowfall = $lastSnowfall;
}
/**
* @return int
*/
public function getLiftsTotal()
public function getLiftsTotal(): int
{
return (int) $this->liftsTotal;
}
@@ -264,15 +261,12 @@ class Snowreport extends AbstractEntity
/**
* @param int $liftsTotal
*/
public function setLiftsTotal($liftsTotal)
public function setLiftsTotal($liftsTotal): void
{
$this->liftsTotal = $liftsTotal;
}
/**
* @return int
*/
public function getLiftsOpened()
public function getLiftsOpened(): int
{
return (int) $this->liftsOpened;
}
@@ -280,7 +274,7 @@ class Snowreport extends AbstractEntity
/**
* @param int $liftsOpened
*/
public function setLiftsOpened($liftsOpened)
public function setLiftsOpened($liftsOpened): void
{
$this->liftsOpened = $liftsOpened;
}
@@ -296,17 +290,17 @@ class Snowreport extends AbstractEntity
/**
* @param \DateTime $lastUpdate
*/
public function setLastUpdate($lastUpdate)
public function setLastUpdate($lastUpdate): void
{
$this->lastUpdate = $lastUpdate;
}
public function addWebcam(Webcam $webcam)
public function addWebcam(Webcam $webcam): void
{
$this->webcams->attach($webcam);
}
public function removeWebcam(Webcam $webcam)
public function removeWebcam(Webcam $webcam): void
{
$this->webcams->detach($webcam);
}
@@ -322,7 +316,7 @@ class Snowreport extends AbstractEntity
/**
* @param ObjectStorage<Webcam> $webcams
*/
public function setWebcams(ObjectStorage $webcams)
public function setWebcams(ObjectStorage $webcams): void
{
$this->webcams = $webcams;
}
@@ -338,7 +332,7 @@ class Snowreport extends AbstractEntity
/**
* @param \DateTime $seasonStart
*/
public function setSeasonStart($seasonStart)
public function setSeasonStart($seasonStart): void
{
$this->seasonStart = $seasonStart;
}
@@ -354,7 +348,7 @@ class Snowreport extends AbstractEntity
/**
* @param \DateTime $seasonEnd
*/
public function setSeasonEnd($seasonEnd)
public function setSeasonEnd($seasonEnd): void
{
$this->seasonEnd = $seasonEnd;
}
@@ -61,7 +61,7 @@ class Teammember extends AbstractEntity
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -77,7 +77,7 @@ class Teammember extends AbstractEntity
/**
* @param string $email
*/
public function setEmail($email)
public function setEmail($email): void
{
$this->email = $email;
}
@@ -93,7 +93,7 @@ class Teammember extends AbstractEntity
/**
* @param string $phone
*/
public function setPhone($phone)
public function setPhone($phone): void
{
$this->phone = $phone;
}
@@ -109,7 +109,7 @@ class Teammember extends AbstractEntity
/**
* @param string $tasks
*/
public function setTasks($tasks)
public function setTasks($tasks): void
{
$this->tasks = $tasks;
}
@@ -125,7 +125,7 @@ class Teammember extends AbstractEntity
/**
* @param FileReference $image
*/
public function setImage($image)
public function setImage($image): void
{
$this->image = $image;
}
@@ -141,7 +141,7 @@ class Teammember extends AbstractEntity
/**
* @param string $description
*/
public function setDescription($description)
public function setDescription($description): void
{
$this->description = $description;
}
@@ -157,7 +157,7 @@ class Teammember extends AbstractEntity
/**
* @param ObjectStorage $categories
*/
public function setCategories($categories)
public function setCategories($categories): void
{
$this->categories = $categories;
}
@@ -121,7 +121,7 @@ class Travelinfo extends AbstractEntity
/**
* @param string $title
*/
public function setTitle($title)
public function setTitle($title): void
{
$this->title = $title;
}
@@ -131,7 +131,7 @@ class Travelinfo extends AbstractEntity
return $this->headerImage;
}
public function setHeaderImage($headerImage)
public function setHeaderImage($headerImage): static
{
$this->headerImage = $headerImage;
@@ -143,7 +143,7 @@ class Travelinfo extends AbstractEntity
return $this->footerImage;
}
public function setFooterImage($footerImage)
public function setFooterImage($footerImage): static
{
$this->footerImage = $footerImage;
@@ -155,7 +155,7 @@ class Travelinfo extends AbstractEntity
return $this->subline;
}
public function setSubline($subline)
public function setSubline($subline): static
{
$this->subline = $subline;
@@ -167,7 +167,7 @@ class Travelinfo extends AbstractEntity
return $this->headline;
}
public function setHeadline($headline)
public function setHeadline($headline): static
{
$this->headline = $headline;
@@ -179,7 +179,7 @@ class Travelinfo extends AbstractEntity
return $this->introText;
}
public function setIntroText($introText)
public function setIntroText($introText): static
{
$this->introText = $introText;
@@ -191,7 +191,7 @@ class Travelinfo extends AbstractEntity
return $this->busInfoText;
}
public function setBusInfoText($busInfoText)
public function setBusInfoText($busInfoText): static
{
$this->busInfoText = $busInfoText;
@@ -203,7 +203,7 @@ class Travelinfo extends AbstractEntity
return $this->departureText;
}
public function setDepartureText($departureText)
public function setDepartureText($departureText): static
{
$this->departureText = $departureText;
@@ -215,7 +215,7 @@ class Travelinfo extends AbstractEntity
return $this->footerText;
}
public function setFooterText($footerText)
public function setFooterText($footerText): static
{
$this->footerText = $footerText;
@@ -227,7 +227,7 @@ class Travelinfo extends AbstractEntity
return $this->additionalInfo;
}
public function setAdditionalInfo($additionalInfo)
public function setAdditionalInfo($additionalInfo): static
{
$this->additionalInfo = $additionalInfo;
@@ -239,7 +239,7 @@ class Travelinfo extends AbstractEntity
return $this->importantPhoneNumbers;
}
public function setImportantPhoneNumbers($importantPhoneNumbers)
public function setImportantPhoneNumbers($importantPhoneNumbers): static
{
$this->importantPhoneNumbers = $importantPhoneNumbers;
@@ -251,7 +251,7 @@ class Travelinfo extends AbstractEntity
return $this->importantLinks;
}
public function setImportantLinks($importantLinks)
public function setImportantLinks($importantLinks): static
{
$this->importantLinks = $importantLinks;
@@ -263,7 +263,7 @@ class Travelinfo extends AbstractEntity
return $this->selfArrangedText;
}
public function setSelfArrangedText($selfArrangedText)
public function setSelfArrangedText($selfArrangedText): static
{
$this->selfArrangedText = $selfArrangedText;
@@ -275,7 +275,7 @@ class Travelinfo extends AbstractEntity
return $this->teasers;
}
public function setTeasers($teasers)
public function setTeasers($teasers): void
{
$this->teasers = $teasers;
}
@@ -285,7 +285,7 @@ class Travelinfo extends AbstractEntity
return $this->links;
}
public function setLinks($links)
public function setLinks($links): static
{
$this->links = $links;
@@ -297,7 +297,7 @@ class Travelinfo extends AbstractEntity
return $this->travelCode;
}
public function setTravelCode($travelCode)
public function setTravelCode($travelCode): static
{
$this->travelCode = $travelCode;
@@ -309,7 +309,7 @@ class Travelinfo extends AbstractEntity
return $this->product;
}
public function setProduct($product)
public function setProduct($product): static
{
$this->product = $product;
return $this;
@@ -320,7 +320,7 @@ class Travelinfo extends AbstractEntity
return $this->hideAddress;
}
public function setHideAddress($hideAddress)
public function setHideAddress($hideAddress): static
{
$this->hideAddress = $hideAddress;
return $this;
@@ -34,7 +34,7 @@ class TravelinfoLink extends AbstractEntity
/**
* @param string $title
*/
public function setTitle($title)
public function setTitle($title): void
{
$this->title = $title;
}
@@ -44,7 +44,7 @@ class TravelinfoLink extends AbstractEntity
return $this->link;
}
public function setLink($link)
public function setLink($link): void
{
$this->link = $link;
}
@@ -54,7 +54,7 @@ class TravelinfoLink extends AbstractEntity
return $this->icon;
}
public function setIcon($icon)
public function setIcon($icon): void
{
$this->icon = $icon;
}
@@ -40,7 +40,7 @@ class TravelinfoTeaser extends AbstractEntity
/**
* @param string $title
*/
public function setTitle($title)
public function setTitle($title): void
{
$this->title = $title;
}
@@ -50,7 +50,7 @@ class TravelinfoTeaser extends AbstractEntity
return $this->bodytext;
}
public function setBodytext($bodytext)
public function setBodytext($bodytext): void
{
$this->bodytext = $bodytext;
}
@@ -60,7 +60,7 @@ class TravelinfoTeaser extends AbstractEntity
return $this->category;
}
public function setCategory($category)
public function setCategory($category): void
{
$this->category = $category;
}
@@ -70,7 +70,7 @@ class TravelinfoTeaser extends AbstractEntity
return $this->image;
}
public function setImage($image)
public function setImage($image): void
{
$this->image = $image;
}
@@ -45,7 +45,7 @@ class Webcam extends AbstractEntity
/**
* @param Snowreport $snowreport
*/
public function setSnowreport($snowreport)
public function setSnowreport($snowreport): void
{
$this->snowreport = $snowreport;
}
@@ -61,7 +61,7 @@ class Webcam extends AbstractEntity
/**
* @param int $vendorUid
*/
public function setVendorUid($vendorUid)
public function setVendorUid($vendorUid): void
{
$this->vendorUid = $vendorUid;
}
@@ -77,7 +77,7 @@ class Webcam extends AbstractEntity
/**
* @param string $name
*/
public function setName($name)
public function setName($name): void
{
$this->name = $name;
}
@@ -93,7 +93,7 @@ class Webcam extends AbstractEntity
/**
* @param string $url
*/
public function setUrl($url)
public function setUrl($url): void
{
$this->url = $url;
}
@@ -109,7 +109,7 @@ class Webcam extends AbstractEntity
/**
* @param boolean $available
*/
public function setAvailable($available)
public function setAvailable($available): void
{
$this->available = $available;
}
@@ -17,7 +17,7 @@ class HotelRepository extends AbstractRepository
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function getSingleByUid($hotelUid)
public function getSingleByUid($hotelUid): array|false
{
$qb = $this->getQueryBuilder();
$qb
@@ -35,7 +35,7 @@ class HotelRepository extends AbstractRepository
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function getDateIndependentSingleByUid($hotelUid)
public function getDateIndependentSingleByUid($hotelUid): array|false
{
$qb = $this->getDbConnection()->createQueryBuilder();
@@ -59,10 +59,9 @@ class HotelRepository extends AbstractRepository
/**
* @param int $productUid
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function getListByProduct($productUid)
public function getListByProduct($productUid): array
{
$qb = $this->getQueryBuilder(false);
$qb
@@ -74,10 +73,9 @@ class HotelRepository extends AbstractRepository
}
/**
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function getListByCriteria(array $criteria)
public function getListByCriteria(array $criteria): array
{
$optionsResolver = new OptionsResolver();
$optionsResolver->setDefined(['regionUid', 'countryUid', 'conceptUid', 'productUid', 'category', 'type']);
@@ -125,10 +123,9 @@ class HotelRepository extends AbstractRepository
}
/**
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function getDateIndependentListByCriteria(array $criteria, array $excludedHotelUids = [])
public function getDateIndependentListByCriteria(array $criteria, array $excludedHotelUids = []): array
{
$optionsResolver = new OptionsResolver();
$optionsResolver->setDefined(['regionUid', 'countryUid', 'conceptUid', 'productUid', 'category', 'type']);
@@ -7,10 +7,7 @@ use EP\EpProducts\Utility\SerializationUtility;
class City
{
/**
* @return array
*/
public static function fromEntity(\EP\EpProducts\Domain\Model\City $entity)
public static function fromEntity(\EP\EpProducts\Domain\Model\City $entity): array
{
$city = [];
@@ -20,7 +17,7 @@ class City
$city['party'] = SerializationUtility::sanitizeText($entity->getParty());
$city['leisure'] = SerializationUtility::sanitizeText($entity->getLeisure());
$city['facts'] = [];
$city['facts']['fact'] = array_map(function ($fact) {
$city['facts']['fact'] = array_map(function ($fact): string {
/** @var Fact $fact */
return htmlspecialchars($fact->getName());
}, $entity->getFacts()->toArray());
@@ -4,10 +4,7 @@ namespace EP\EpProducts\Domain\Serialization;
class Date
{
/**
* @return array
*/
public static function fromArray(array $array)
public static function fromArray(array $array): array
{
$date = [
'servicesincluded' => [],
@@ -5,10 +5,7 @@ use EP\EpProducts\Utility\SerializationUtility;
class Hotel
{
/**
* @return array
*/
public static function fromEntity(\EP\EpProducts\Domain\Model\Hotel $entity)
public static function fromEntity(\EP\EpProducts\Domain\Model\Hotel $entity): array
{
$hotel = [
'dates' => [],
@@ -11,14 +11,13 @@ class Product
{
/**
* @param array $imageProcessingInstructions
* @return array
*/
public static function fromEntity
(
\EP\EpProducts\Domain\Model\Product $entity,
?array $imageProcessingInstructions = null,
array $queryData = []
)
): array
{
$product = [
'concept' => [],
@@ -37,7 +36,7 @@ class Product
$product['name'] .= ' (' . $entity->getConcept()->getName() . ')';
}
$product['facts']['fact'] = array_map(function ($fact) {
$product['facts']['fact'] = array_map(function ($fact): string {
/** @var Fact $fact */
return htmlspecialchars($fact->getName());
}, $entity->getFacts()->toArray());
@@ -7,10 +7,7 @@ use EP\EpProducts\Utility\SerializationUtility;
class Region
{
/**
* @return array
*/
public static function fromEntity(\EP\EpProducts\Domain\Model\Region $entity)
public static function fromEntity(\EP\EpProducts\Domain\Model\Region $entity): array
{
$region = [];
@@ -24,7 +21,7 @@ class Region
$region['skipass'] = SerializationUtility::sanitizeText($entity->getSkiPass());
$region['news'] = SerializationUtility::sanitizeText($entity->getNews());
$region['facts'] = [];
$region['facts']['fact'] = array_map(function ($fact) {
$region['facts']['fact'] = array_map(function ($fact): string {
/** @var Fact $fact */
return htmlspecialchars($fact->getName());
}, $entity->getFacts()->toArray());
@@ -3,10 +3,7 @@ namespace EP\EpProducts\Domain\Serialization;
class Room
{
/**
* @return array
*/
public static function fromArray(array $array)
public static function fromArray(array $array): array
{
$room = [];
@@ -6,10 +6,7 @@ namespace EP\EpProducts\Domain\Serialization;
class Services
{
/**
* @var array
*/
private static $categoryLabels = [
private static array $categoryLabels = [
'BUS' => 'Anreise',
'VPF' => 'Verpflegung',
'SPA' => 'Skipass',
@@ -18,10 +15,7 @@ class Services
'SON' => 'Sonstiges',
];
/**
* @return array
*/
public static function fromArray(array $array)
public static function fromArray(array $array): array
{
$services = [
'category' => [],
@@ -2,6 +2,7 @@
namespace EP\EpProducts\Middleware;
use TYPO3\CMS\Core\Resource\FileInterface;
use TYPO3\CMS\Core\Database\Connection;
use EP\EpProducts\ContentFeed\ContentFeedApi;
use EP\EpProducts\Http\ApiKeyAuthenticator;
@@ -267,7 +268,7 @@ class ApiMiddleware implements MiddlewareInterface
private function serializeFileReferences(array $files): array
{
return array_map(fn($file) => [
return array_map(fn(FileInterface $file): array => [
'url' => $this->imageService->getImageUri($file, true),
'alt' => $file->getProperty('alternative'),
'title' => $file->getProperty('title'),
@@ -127,7 +127,7 @@ final class ApiImportSource implements ProductImportSource, SingletonInterface,
* false when the export changed mid-walk and the walk must restart
* @throws ApiException
*/
private function walkPages()
private function walkPages(): null|false|array
{
$rows = [];
$sourceGeneratedAt = null;
@@ -60,25 +60,16 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
*/
const SELECTION_GROUP_LABEL_PERSONNEL = 'Leistungen Personal';
/**
* @var int
*/
private $pid = 0;
private int $pid;
/**
* @var array
*/
private $hotelMappings = [];
private array $hotelMappings = [];
/**
* @var Connection
*/
private $db;
/**
* @var array
*/
static private $cache = [
static private array $cache = [
'datesAdded' => [],
];
@@ -362,7 +353,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
$servicesTransportationOptional = [];
if (array_key_exists('BUS', $servicesTransportation)) {
$servicesTransportationOptional = array_filter($servicesTransportation['BUS'], fn($service) => $service['price'] !== 0);
$servicesTransportationOptional = array_filter($servicesTransportation['BUS'], fn($service): bool => $service['price'] !== 0);
}
if (array_key_exists('BAH', $servicesTransportation)) {
$servicesTransportationOptional = array_merge(
@@ -392,7 +383,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
foreach ($combinedServices as $key => $list)
{
uasort($list, fn($a, $b) => strcmp($a['label'], $b['label']));
uasort($list, fn($a, $b): int => strcmp($a['label'], $b['label']));
$combinedServices[$key] = $list;
}
$date['services_general'] = serialize($combinedServices);
@@ -418,7 +409,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
'time' => $pickupTime,
];
}
usort($pickups, function ($a, $b) {
usort($pickups, function ($a, $b): int {
if (empty($a['date']) || empty($b['date']) || empty($a['time']) || empty($b['time'])) {
return 0;
}
@@ -455,7 +446,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
$this->addServices($generalServices, $services);
$this->addServices($hotelServices, $services);
foreach ($services as $key => $list) {
uasort($list, fn($a, $b) => strcmp($a['label'], $b['label']));
uasort($list, fn($a, $b): int => strcmp($a['label'], $b['label']));
$services[$key] = $list;
}
@@ -15,7 +15,7 @@ class DateService implements SingletonInterface
/**
* @var string[]
*/
private $serviceSections = [
private array $serviceSections = [
'BUS' => 'Anreise',
'VPF' => 'Verpflegung',
'SPA' => 'Skipass',
@@ -26,7 +26,7 @@ class DateService implements SingletonInterface
'PAR' => 'Parkplatz',
];
private $serviceSectionsMapping = [
private array $serviceSectionsMapping = [
'VE2' => 'VER',
'VE3' => 'VER',
'VE4' => 'VER',
@@ -72,7 +72,7 @@ class DateService implements SingletonInterface
]);
}
private function configurePriceTableOptions(OptionsResolver $resolver)
private function configurePriceTableOptions(OptionsResolver $resolver): void
{
$resolver->setRequired(['product', 'hotel', 'myEpUrl']);
$resolver->setDefined(['filterSettings', 'date', 'paCode']);
@@ -102,7 +102,7 @@ class DateService implements SingletonInterface
return $this->productRepository->getAvailableDates($product, $hotel, $filterSettings);
}
private function configureDatesTableOptions(OptionsResolver $resolver)
private function configureDatesTableOptions(OptionsResolver $resolver): void
{
$resolver->setDefined(['filterSettings']);
$resolver->setRequired(['product', 'hotel']);
@@ -186,7 +186,7 @@ class DateService implements SingletonInterface
$processed = [];
foreach ($servicesFlat as $key => $services) {
$servicesWithCosts = array_filter($services, fn($service) => '0,00' !== $service['price']);
$servicesWithCosts = array_filter($services, fn($service): bool => '0,00' !== $service['price']);
if (0 === count($servicesWithCosts)) {
continue;
}
@@ -351,7 +351,7 @@ class DateService implements SingletonInterface
{
// The rooms are keyed by pax, so this compares the 4-person prices; hotels without
// one compare as '' (what PHP 7.4 read from the missing offset)
uasort($rows, fn($a, $b) => strcmp(
uasort($rows, fn($a, $b): int => strcmp(
$a['rooms'][Hotel::CATEGORY_SUPER_DELUXE]['price'] ?? '',
$b['rooms'][Hotel::CATEGORY_SUPER_DELUXE]['price'] ?? ''
));
@@ -363,7 +363,7 @@ class DateService implements SingletonInterface
public function hasIncludedServices(array $tableData): bool
{
return array_any($tableData, fn($row) => ($row['busIncluded'] ?? null) || ($row['skiPassIncluded'] ?? null));
return array_any($tableData, fn($row): bool => ($row['busIncluded'] ?? null) || ($row['skiPassIncluded'] ?? null));
}
/**
@@ -39,17 +39,17 @@ class FilterService implements SingletonInterface
'bus' => null,
]);
foreach (['hotelUid', 'productUid', 'nights', 'pax'] as $key) {
$optionsResolver->setNormalizer($key, fn(Options $options, $value) => null !== $value ? (int)$value : null);
$optionsResolver->setNormalizer($key, fn(Options $options, $value): ?int => null !== $value ? (int)$value : null);
}
foreach (['productsPid', 'priceRanges', 'countryUids', 'regionUids', 'cityUids', 'conceptUids', 'boardTypes', 'hotelTypes', 'roomTypes'] as $key) {
$optionsResolver->setNormalizer($key, function (Options $options, $value) {
$optionsResolver->setNormalizer($key, function (Options $options, $value): array {
if (empty($value)) {
return [];
}
return array_map(intval(...), (array) $value);
});
}
$optionsResolver->setNormalizer('bus', fn(Options $options, $value) => null !== $value ? (bool)$value : null);
$optionsResolver->setNormalizer('bus', fn(Options $options, $value): ?bool => null !== $value ? (bool)$value : null);
$filterSettings = $optionsResolver->resolve($filterSettings);
@@ -246,7 +246,7 @@ class FilterService implements SingletonInterface
}
foreach ($destinations as $key => $value) {
usort($value['regions'], fn($a, $b) => strcmp($a['label'], $b['label']));
usort($value['regions'], fn($a, $b): int => strcmp($a['label'], $b['label']));
$destinations[$key] = $value;
}
sort($destinations);
@@ -254,7 +254,7 @@ class FilterService implements SingletonInterface
sort($roomTypes);
ksort($priceRanges);
usort($boardTypes, fn($a, $b) => strcmp($a['label'], $b['label']));
usort($boardTypes, fn($a, $b): int => strcmp($a['label'], $b['label']));
$filterOptions = new FilterOptions();
$filterOptions->setPriceRanges($priceRanges);
@@ -6,10 +6,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
class FilterSettingsEncoder
{
/**
* @return array
*/
private function getMapping()
private function getMapping(): array
{
return [
[ 'countryUids', 'array' ],
@@ -27,9 +27,8 @@ class HotelDataService implements SingletonInterface
/**
* @param int $hotelUid
* @return array
*/
public function getTeaser($hotelUid)
public function getTeaser($hotelUid): array
{
$hotelData = $this->hotelRepository->getSingleByUid($hotelUid);
@@ -84,10 +83,7 @@ class HotelDataService implements SingletonInterface
return $this->preprocessTeaserData($teaserData);
}
/**
* @return array
*/
private function preprocessTeaserData(array $teaserData)
private function preprocessTeaserData(array $teaserData): array
{
$teasers = [];
foreach ($teaserData as $row)
@@ -142,10 +138,7 @@ class HotelDataService implements SingletonInterface
return $teasers;
}
/**
* @return array
*/
public function preprocessHotelList(array $hotelData)
public function preprocessHotelList(array $hotelData): array
{
$hotels = [];
foreach ($hotelData as $row)
@@ -209,7 +202,7 @@ class HotelDataService implements SingletonInterface
}
}
uasort($hotels, function ($a, $b) {
uasort($hotels, function ($a, $b): int {
// Set price to a very high value to sort hotels
// that are not bookable to end of list
if ($a['minPrice'] === null || !$a['available']) {
@@ -11,7 +11,7 @@ class LabelService
* @param array $parameters
* @param array $parentObject
*/
public function getProductLabel(&$parameters, $parentObject)
public function getProductLabel(&$parameters, $parentObject): void
{
$product = BackendUtility::getRecord('tx_epproducts_domain_model_product', $parameters['row']['uid']);
$parameters['title'] = $product['name_internal'];
@@ -24,7 +24,7 @@ class LabelService
* @param array $parameters
* @param array $parentObject
*/
public function getHotelLabel(&$parameters, $parentObject)
public function getHotelLabel(&$parameters, $parentObject): void
{
$hotel = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $parameters['row']['uid']);
$parameters['title'] = $hotel['name'];
@@ -37,7 +37,7 @@ class LabelService
* @param array $parameters
* @param array $parentObject
*/
public function getDateLabel(&$parameters, $parentObject)
public function getDateLabel(&$parameters, $parentObject): void
{
$date = BackendUtility::getRecord('tx_epproducts_domain_model_date', $parameters['row']['uid']);
// $dateFrom = new \DateTime($date['date_start']);
@@ -50,7 +50,7 @@ class LabelService
* @param array $parameters
* @param array $parentObject
*/
public function getOfficetipLabel(&$parameters, $parentObject)
public function getOfficetipLabel(&$parameters, $parentObject): void
{
$officetip = BackendUtility::getRecord('tx_epproducts_domain_model_officetip', $parameters['row']['uid']);
// Many tips still point to team members who have left (deleted records)
@@ -65,7 +65,7 @@ class LabelService
* @param array $parameters
* @param array $parentObject
*/
public function getContingentLabel(&$parameters, $parentObject)
public function getContingentLabel(&$parameters, $parentObject): void
{
$contingent = BackendUtility::getRecord('tx_epproducts_domain_model_contingent', $parameters['row']['uid']);
$hotel = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $contingent['hotel']);
@@ -77,7 +77,7 @@ class LabelService
* @param array $parameters
* @param array $parentObject
*/
public function getGroupsPriceConfigLabel(&$parameters, $parentObject)
public function getGroupsPriceConfigLabel(&$parameters, $parentObject): void
{
$record = BackendUtility::getRecord('tx_epproducts_domain_model_groupspriceconfig', $parameters['row']['uid']);
$parameters['title'] = sprintf('%s - %s', date('d.m.Y', $record['date_from']), date('d.m.Y', $record['date_to']));
@@ -25,7 +25,6 @@ class ResellerDataService implements SingletonInterface
/**
* @param string $type
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function preprocessAll(
@@ -33,7 +32,7 @@ class ResellerDataService implements SingletonInterface
string $myEpUrl,
?array $imageProcessingInstructions = null,
$type = 'facebook',
) {
): array {
$data = [];
$products = $reseller->getProducts();
@@ -96,9 +95,8 @@ class ResellerDataService implements SingletonInterface
/**
* @param string|null $paCode
* @return array
*/
public function preprocessDates(array $dates, string $myEpUrl, $paCode = null)
public function preprocessDates(array $dates, string $myEpUrl, $paCode = null): array
{
$data = [];
@@ -122,10 +120,9 @@ class ResellerDataService implements SingletonInterface
}
/**
* @return bool|array
* @throws \Doctrine\DBAL\DBALException
*/
public function getResellerForCurrentDomain()
public function getResellerForCurrentDomain(): array|false
{
$currentDomain = GeneralUtility::getIndpEnv('HTTP_HOST');
@@ -87,6 +87,6 @@ class RoomTypeResolver
private function matchesAny(string $label, array $patterns): bool
{
return array_any($patterns, fn($pattern) => str_contains(mb_strtolower($label), mb_strtolower($pattern)));
return array_any($patterns, fn($pattern): bool => str_contains(mb_strtolower($label), mb_strtolower($pattern)));
}
}
@@ -225,7 +225,7 @@ class SearchResultService implements SingletonInterface
continue;
}
uasort($section['items'], fn($a, $b) => strcmp((string)$a['minPrice'], (string)$b['minPrice']));
uasort($section['items'], fn($a, $b): int => strcmp((string)$a['minPrice'], (string)$b['minPrice']));
}
// Turn result data into simple array to ensure order in js
@@ -160,7 +160,7 @@ class SnowreportImportService implements LoggerAwareInterface
$row[$field['column']] = $this->convertValue((string)$reportXml->{$key}, $field['type'], $key);
}
$vendorUid = (int)$row['vendor_uid'];
$row = array_map(fn ($value) => is_bool($value) ? (int)$value : $value, $row);
$row = array_map(fn ($value): int|string => is_bool($value) ? (int)$value : $value, $row);
$row['tstamp'] = $now;
if (isset($snowreports[$vendorUid])) {
@@ -11,10 +11,9 @@ trait DbConnectionTrait
/**
* @param string $connectionName
* @return Connection
* @throws \Doctrine\DBAL\DBALException
*/
protected function getDbConnection($connectionName = 'Default')
protected function getDbConnection($connectionName = 'Default'): Connection
{
/** @var ConnectionPool $connectionPool */
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
@@ -11,10 +11,7 @@ use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
class SerializationUtility
{
/**
* @var ImageService
*/
private static $imageService;
private static ?object $imageService = null;
/**
* @var ContentObjectRenderer
@@ -23,9 +20,8 @@ class SerializationUtility
/**
* @param $text
* @return string
*/
public static function sanitizeText($text)
public static function sanitizeText($text): string
{
$text = str_replace('&nbsp;', ' ', $text);
@@ -34,9 +30,8 @@ class SerializationUtility
/**
* @param array $processingInstructions
* @return array
*/
public static function preprocessImages(ObjectStorage $images, ?array $processingInstructions = null)
public static function preprocessImages(ObjectStorage $images, ?array $processingInstructions = null): array
{
$data = [];
foreach ($images as $file)
@@ -7,7 +7,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function () {
call_user_func(function (): void {
ExtensionUtility::registerPlugin(
'EpProducts',
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function () {
call_user_func(function (): void {
$GLOBALS['TCA']['tx_epproducts_domain_model_teammember']['columns']['categories'] = ['config' => ['type' => 'category']];
ExtensionManagementUtility::addToAllTCAtypes('tx_epproducts_domain_model_teammember', 'categories');
+1 -1
View File
@@ -29,7 +29,7 @@ use EP\EpProducts\Log\Writer;
defined('TYPO3') || die('Access denied.');
$boot = function () {
$boot = function (): void {
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_cache'] ?? null)) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_cache'] = [];
}
@@ -43,7 +43,7 @@ class ContextProcessor implements DataProcessorInterface
/**
* @return string
*/
private function getPaCodeFromRequest()
private function getPaCodeFromRequest(): string|array
{
$currentUri = GeneralUtility::getIndpEnv('REQUEST_URI');
$query = parse_url($currentUri, \PHP_URL_QUERY);
@@ -67,7 +67,7 @@ class ContextProcessor implements DataProcessorInterface
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
private function getContextRecord($uid, $table)
private function getContextRecord($uid, $table): array|false
{
$qb = $this->getDbConnection()->createQueryBuilder();
@@ -67,10 +67,7 @@ class SliderProcessor implements DataProcessorInterface
return $processedData;
}
/**
* @return null|int
*/
private function getParentPageWithSlides()
private function getParentPageWithSlides(): ?int
{
$rootlineUtility = new RootlineUtility($GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.page.information')->getId());
$rootline = $rootlineUtility->get();
@@ -45,7 +45,7 @@ class Page extends AbstractEntity
/**
* @param bool $hidden
*/
public function setHidden($hidden)
public function setHidden($hidden): void
{
$this->hidden = $hidden;
}
@@ -61,7 +61,7 @@ class Page extends AbstractEntity
/**
* @param string $title
*/
public function setTitle($title)
public function setTitle($title): void
{
$this->title = $title;
}
@@ -77,7 +77,7 @@ class Page extends AbstractEntity
/**
* @param string $seoTitle
*/
public function setSeoTitle($seoTitle)
public function setSeoTitle($seoTitle): void
{
$this->seoTitle = $seoTitle;
}
@@ -93,7 +93,7 @@ class Page extends AbstractEntity
/**
* @param string $description
*/
public function setDescription($description)
public function setDescription($description): void
{
$this->description = $description;
}
@@ -10,7 +10,7 @@ class ContainerViewHelper extends AbstractViewHelper
/**
* @var int[]
*/
private static $scale = [
private static array $scale = [
'default' => 0,
'small' => 8,
'large' => 16,
@@ -22,12 +22,9 @@ class ContainerViewHelper extends AbstractViewHelper
#[\Override]
protected $escapeOutput = false;
/**
* @var array
*/
private static $columnsWithoutContainers = [ 0, 1, 3 ];
private static array $columnsWithoutContainers = [ 0, 1, 3 ];
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -14,7 +14,7 @@ class FilterSettingsEncoderViewHelper extends AbstractViewHelper
#[\Override]
protected $escapeOutput = false;
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -17,7 +17,7 @@ class GmapsUrlViewHelper extends AbstractViewHelper
const URLBASE = 'http://maps.google.com/maps?q=%s,%s&t=%s&z=%d';
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -14,7 +14,7 @@ class IconViewHelper extends AbstractTagBasedViewHelper
#[\Override]
protected $tagName = 'svg';
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
$this->registerArgument('icon', 'string', 'Icon name', true);
@@ -33,7 +33,7 @@ class IconViewHelper extends AbstractTagBasedViewHelper
return $this->tag->render();
}
private function getImageService()
private function getImageService(): object
{
return GeneralUtility::makeInstance(ImageService::class);
}
@@ -7,7 +7,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
class NightsOptionsViewHelper extends AbstractViewHelper
{
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -7,7 +7,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
class PriceRangeViewHelper extends AbstractViewHelper
{
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -19,21 +19,18 @@ class PriceViewHelper extends AbstractViewHelper
{
use CompileWithContentArgumentAndRenderStatic;
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
$this->registerArgument('value', 'mixed', 'Amount in euros');
}
/**
* @return string
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
) {
): string {
$amount = round((float) $renderChildrenClosure(), 2);
$decimals = floor($amount) === $amount ? 0 : 2;
@@ -14,7 +14,7 @@ class RatingViewHelper extends AbstractViewHelper
#[\Override]
protected $escapeOutput = false;
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -7,7 +7,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
class ThemeClassesViewHelper extends AbstractViewHelper
{
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -13,7 +13,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
class ProductViewHelper extends AbstractViewHelper
{
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -13,7 +13,7 @@ class VideoViewHelper extends AbstractViewHelper
#[\Override]
protected $escapeOutput = false;
public function initializeArguments()
public function initializeArguments(): void
{
parent::initializeArguments();
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$temporaryColumns = [
'tx_eptheme_context_pacode' => [
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function () {
call_user_func(function (): void {
ExtensionManagementUtility::addStaticFile(
'ep_theme',
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function () {
call_user_func(function (): void {
$ttContentColumns = [
'button' => [
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -4,7 +4,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use B13\Container\Tca\Registry;
use B13\Container\Tca\ContainerConfiguration;
call_user_func(function () {
call_user_func(function (): void {
GeneralUtility::makeInstance(Registry::class)->configureContainer(
new ContainerConfiguration(
'ep_container_quarters',
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function () {
call_user_func(function (): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
@@ -6,7 +6,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function() {
call_user_func(function(): void {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
ExtensionManagementUtility::addTcaSelectItem(
+1 -1
View File
@@ -7,7 +7,7 @@ use EP\EpTheme\MetaTag\OpenGraphMetaTagManager;
defined('TYPO3') || die();
$boot = function () {
$boot = function (): void {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['ep'] = ['Ep\\EpTheme\\ViewHelpers'];
$GLOBALS['TYPO3_CONF_VARS']['LOG']['TYPO3']['CMS']['deprecations']['writerConfiguration'][LogLevel::NOTICE] = [];
+17 -1
View File
@@ -3,7 +3,14 @@
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector;
use Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ScalarParamTypeByMethodCallTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector;
use Rector\TypeDeclaration\Rector\FuncCall\AddArrayFunctionClosureParamTypeRector;
use Rector\TypeDeclaration\Rector\FuncCall\AddArrowFunctionParamArrayWhereDimFetchRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddClosureParamTypeForArrayMapRector;
use Rector\ValueObject\PhpVersion;
use Ssch\TYPO3Rector\CodeQuality\General\ConvertImplicitVariablesToExplicitGlobalsRector;
use Ssch\TYPO3Rector\CodeQuality\General\ExtEmConfRector;
@@ -25,10 +32,19 @@ return RectorConfig::configure()
MigratePluginContentElementAndPluginSubtypesRector::class,
MigratePluginContentElementAndPluginSubtypesSwapArgsRector::class,
MigratePluginContentElementAndPluginSubtypesTCARector::class,
// Scalar/array parameter types inferred from call sites or docblocks: values from the database, form
// input and the import feeds arrive as strings and would throw instead of being converted
RecastingRemovalRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
ScalarParamTypeByMethodCallTypeRector::class,
StrictArrayParamDimFetchRector::class,
AddArrayFunctionClosureParamTypeRector::class,
AddArrowFunctionParamArrayWhereDimFetchRector::class,
AddClosureParamTypeForArrayMapRector::class,
])
->withPhpVersion(PhpVersion::PHP_85)
->withPhpSets(php85: true)
->withPreparedSets(deadCode: true, codeQuality: true)
->withPreparedSets(deadCode: true, codeQuality: true, typeDeclarations: true)
->withSets([
Typo3SetList::GENERAL,
Typo3LevelSetList::UP_TO_TYPO3_13,