From f4556ee75c64fa1a45152614fd9818d3c669b717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Mon, 26 Oct 2026 11:10:20 +0100 Subject: [PATCH] refactor: remove dead code via Rector rector.php gets the deadCode set: @param/@return/@var tags that only repeat native types, === true comparisons, three unused constructor dependencies (DateService, ProductDataService, AjaxWatchlistController), the unused reseller lookup in ContextProcessor and an always-false check in AbstractMappedFinisher (trimExplode with removeEmpty never yields an empty remote name). Checked locally: frontend crawl (~1,900 URLs) and the backchannel APIs render the same as before. Co-Authored-By: Claude Opus 5.5 --- .../Classes/Command/DateCommandController.php | 6 -- .../Classes/ContentFeed/RecordSerializer.php | 1 - .../Controller/AjaxFilterPanelController.php | 6 -- .../Controller/AjaxSearchController.php | 7 --- .../Controller/AjaxTableController.php | 28 --------- .../Controller/AjaxWatchlistController.php | 9 --- .../Classes/Controller/CityController.php | 4 -- .../Classes/Controller/ConceptController.php | 5 -- .../Classes/Controller/CountryController.php | 4 -- .../Classes/Controller/FaqController.php | 3 - .../Classes/Controller/HotelController.php | 6 -- .../Classes/Controller/MapController.php | 4 -- .../Classes/Controller/ProductController.php | 13 ----- .../Classes/Controller/RegionController.php | 4 -- .../Classes/Controller/SearchController.php | 6 -- .../Classes/Controller/TeamController.php | 5 -- .../ep_products/Classes/Domain/Model/City.php | 6 -- .../Classes/Domain/Model/Concept.php | 6 -- .../Classes/Domain/Model/Country.php | 6 -- .../ep_products/Classes/Domain/Model/Date.php | 21 ------- .../Domain/Model/Dto/FilterOptions.php | 9 --- .../Classes/Domain/Model/GroupsPriceBoard.php | 18 ------ .../Domain/Model/GroupsPriceConfig.php | 36 ------------ .../Domain/Model/GroupsPriceOption.php | 30 ---------- .../Classes/Domain/Model/Hotel.php | 54 ----------------- .../Classes/Domain/Model/Officetip.php | 3 - .../Classes/Domain/Model/Product.php | 21 ------- .../Classes/Domain/Model/Region.php | 3 - .../Classes/Domain/Model/SearchResult.php | 1 - .../Classes/Domain/Model/Snowreport.php | 6 -- .../Domain/Repository/AbstractRepository.php | 1 - .../Domain/Repository/HotelRepository.php | 3 - .../Repository/TeammemberRepository.php | 1 - .../Classes/Domain/Serialization/City.php | 1 - .../Classes/Domain/Serialization/Date.php | 1 - .../Classes/Domain/Serialization/Hotel.php | 1 - .../Classes/Domain/Serialization/Product.php | 2 - .../Classes/Domain/Serialization/Region.php | 1 - .../Classes/Domain/Serialization/Room.php | 1 - .../Classes/Domain/Serialization/Services.php | 1 - .../ep_products/Classes/MyEP/ApiClient.php | 6 +- .../Classes/Service/DateImportService.php | 58 +------------------ .../Classes/Service/DateService.php | 18 +----- .../Classes/Service/FilterService.php | 4 +- .../Classes/Service/FilterSettingsEncoder.php | 1 - .../Classes/Service/HotelDataService.php | 12 ---- .../Classes/Service/ProductDataService.php | 27 --------- .../Classes/Service/ProductImport.php | 1 - .../Classes/Service/ResellerDataService.php | 12 ---- .../Classes/Service/RoomTypeResolver.php | 6 -- .../Classes/Service/SearchResultService.php | 5 -- .../Classes/Utility/SerializationUtility.php | 1 - .../DataProcessing/ContextProcessor.php | 16 ----- .../DataProcessing/FlexFormProcessor.php | 4 -- .../DataProcessing/SliderProcessor.php | 4 -- .../DataProcessing/TeaserImageProcessor.php | 4 -- .../DataProcessing/TeaserProcessor.php | 4 -- .../ep_theme/Classes/Domain/Model/Page.php | 6 -- .../Classes/Form/AbstractMappedFinisher.php | 10 ++-- .../Classes/ViewHelpers/MyEpUrlViewHelper.php | 1 - .../Classes/ViewHelpers/PriceViewHelper.php | 3 - rector.php | 1 + 62 files changed, 14 insertions(+), 534 deletions(-) diff --git a/packages/ep_products/Classes/Command/DateCommandController.php b/packages/ep_products/Classes/Command/DateCommandController.php index 1ca1505..fdb14ce 100644 --- a/packages/ep_products/Classes/Command/DateCommandController.php +++ b/packages/ep_products/Classes/Command/DateCommandController.php @@ -13,10 +13,6 @@ use Symfony\Component\Console\Output\OutputInterface; class DateCommandController extends Command { - /** - * @param DateImportService $dateImportService - * @param ProductImportSource $importSource - */ public function __construct ( private readonly DateImportService $dateImportService, @@ -27,8 +23,6 @@ class DateCommandController extends Command } /** - * @param InputInterface $input - * @param OutputInterface $output * @throws \Doctrine\DBAL\DBALException */ public function execute(InputInterface $input, OutputInterface $output): int diff --git a/packages/ep_products/Classes/ContentFeed/RecordSerializer.php b/packages/ep_products/Classes/ContentFeed/RecordSerializer.php index 3e5e7e8..21def7c 100644 --- a/packages/ep_products/Classes/ContentFeed/RecordSerializer.php +++ b/packages/ep_products/Classes/ContentFeed/RecordSerializer.php @@ -351,7 +351,6 @@ class RecordSerializer } /** - * @param array $infoboxUids * @return array */ private function findInfoboxTexts(array $infoboxUids): array diff --git a/packages/ep_products/Classes/Controller/AjaxFilterPanelController.php b/packages/ep_products/Classes/Controller/AjaxFilterPanelController.php index 707e07a..d7937f9 100644 --- a/packages/ep_products/Classes/Controller/AjaxFilterPanelController.php +++ b/packages/ep_products/Classes/Controller/AjaxFilterPanelController.php @@ -14,9 +14,6 @@ class AjaxFilterPanelController extends ActionController use RequestArgumentTypeConversionTrait; - /** - * @param FilterService $filterService - */ public function __construct(private FilterService $filterService, private SearchResultService $searchResultService) { } @@ -27,9 +24,6 @@ class AjaxFilterPanelController extends ActionController $this->processFilterSettingsArgument($forcedConceptUids); } - /** - * @param array $filterSettings - */ public function indexAction(array $filterSettings): ResponseInterface { $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'] ?? ''); diff --git a/packages/ep_products/Classes/Controller/AjaxSearchController.php b/packages/ep_products/Classes/Controller/AjaxSearchController.php index db6e2a4..9915f5b 100644 --- a/packages/ep_products/Classes/Controller/AjaxSearchController.php +++ b/packages/ep_products/Classes/Controller/AjaxSearchController.php @@ -15,10 +15,6 @@ class AjaxSearchController extends ActionController use RequestArgumentTypeConversionTrait; - /** - * @param FilterService $filterService - * @param SearchResultService $searchResultService - */ public function __construct(private FilterService $filterService, private SearchResultService $searchResultService) { } @@ -29,9 +25,6 @@ class AjaxSearchController extends ActionController $this->processFilterSettingsArgument($forcedConceptUids); } - /** - * @param array $filterSettings - */ public function searchresultAction(array $filterSettings): ResponseInterface { $dateSelected = false; diff --git a/packages/ep_products/Classes/Controller/AjaxTableController.php b/packages/ep_products/Classes/Controller/AjaxTableController.php index 610dfc2..8b7c326 100644 --- a/packages/ep_products/Classes/Controller/AjaxTableController.php +++ b/packages/ep_products/Classes/Controller/AjaxTableController.php @@ -24,14 +24,6 @@ class AjaxTableController extends ActionController use RequestArgumentTypeConversionTrait; - /** - * @param ProductRepository $productRepository - * @param InfoboxRepository $infoboxRepository - * @param DateService $dateService - * @param FilterService $filterService - * @param ResellerDataService $resellerDataService - * @param MyEpUrlResolverService $myEpUrlResolverService - */ public function __construct( private ProductRepository $productRepository, private InfoboxRepository $infoboxRepository, @@ -54,12 +46,6 @@ class AjaxTableController extends ActionController } } - /** - * @param Product $product - * @param Hotel $hotel - * @param string|null $dateFrom - * @param string|null $dateTo - */ public function datestableAction( Product $product, Hotel $hotel, @@ -149,12 +135,6 @@ class AjaxTableController extends ActionController return $this->htmlResponse(); } - /** - * @param Product $product - * @param Hotel $hotel - * @param Date $date - * @param bool $singleDate - */ public function pricetableAction( Product $product, Hotel $hotel, @@ -203,10 +183,6 @@ class AjaxTableController extends ActionController return $this->htmlResponse(); } - /** - * @param Product $product - * @param Hotel $hotel - */ public function pricetableHtmlAction(Product $product, Hotel $hotel): ResponseInterface { $nonBookableInfo = $this->getNonBookableInfobox($product); @@ -231,9 +207,6 @@ class AjaxTableController extends ActionController return $this->htmlResponse(); } - /** - * @param Product $product - */ public function eventPricetableAction(Product $product): ResponseInterface { $roomTypes = GeneralUtility::trimExplode(',', $this->settings['priceTableRoomTypes'] ?? ''); @@ -270,7 +243,6 @@ class AjaxTableController extends ActionController } /** - * @param Product $product * @return Infobox */ private function getNonBookableInfobox(Product $product) diff --git a/packages/ep_products/Classes/Controller/AjaxWatchlistController.php b/packages/ep_products/Classes/Controller/AjaxWatchlistController.php index e3ab6cd..c1d76c4 100644 --- a/packages/ep_products/Classes/Controller/AjaxWatchlistController.php +++ b/packages/ep_products/Classes/Controller/AjaxWatchlistController.php @@ -4,7 +4,6 @@ namespace EP\EpProducts\Controller; use Psr\Http\Message\ResponseInterface; use EP\EpProducts\Domain\Repository\ProductRepository; -use EP\EpProducts\Service\FilterService; use EP\EpProducts\Service\SearchResultService; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; @@ -12,15 +11,9 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class AjaxWatchlistController extends ActionController { - /** - * @param ProductRepository $productRepository - * @param SearchResultService $searchResultService - * @param FilterService $filterService - */ public function __construct( private readonly ProductRepository $productRepository, private readonly SearchResultService $searchResultService, - private readonly FilterService $filterService, ) { } @@ -33,8 +26,6 @@ class AjaxWatchlistController extends ActionController } /** - * @param array $watchlistUids - * @return string * @throws \Doctrine\DBAL\DBALException */ public function listAction(array $watchlistUids = []): ResponseInterface diff --git a/packages/ep_products/Classes/Controller/CityController.php b/packages/ep_products/Classes/Controller/CityController.php index f58f6ca..09b2e0d 100644 --- a/packages/ep_products/Classes/Controller/CityController.php +++ b/packages/ep_products/Classes/Controller/CityController.php @@ -11,10 +11,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class CityController extends ActionController { - /** - * @param CityRepository $cityRepository - * @param ProductDataService $productDataService - */ public function __construct( private readonly CityRepository $cityRepository, private readonly ProductDataService $productDataService, diff --git a/packages/ep_products/Classes/Controller/ConceptController.php b/packages/ep_products/Classes/Controller/ConceptController.php index 4361bca..570cf25 100644 --- a/packages/ep_products/Classes/Controller/ConceptController.php +++ b/packages/ep_products/Classes/Controller/ConceptController.php @@ -13,11 +13,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class ConceptController extends ActionController { - /** - * @param ConceptRepository $conceptRepository - * @param ProductDataService $productDataService - * @param PageRepository $pageRepository - */ public function __construct( private readonly ConceptRepository $conceptRepository, private readonly ProductDataService $productDataService, diff --git a/packages/ep_products/Classes/Controller/CountryController.php b/packages/ep_products/Classes/Controller/CountryController.php index 4834d2b..95aa09a 100644 --- a/packages/ep_products/Classes/Controller/CountryController.php +++ b/packages/ep_products/Classes/Controller/CountryController.php @@ -12,10 +12,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class CountryController extends ActionController { - /** - * @param CountryRepository $countryRepository - * @param ProductDataService $productDataService - */ public function __construct( private readonly CountryRepository $countryRepository, private readonly ProductDataService $productDataService, diff --git a/packages/ep_products/Classes/Controller/FaqController.php b/packages/ep_products/Classes/Controller/FaqController.php index 58a608f..1e7991a 100644 --- a/packages/ep_products/Classes/Controller/FaqController.php +++ b/packages/ep_products/Classes/Controller/FaqController.php @@ -9,9 +9,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class FaqController extends ActionController { - /** - * @param FaqRepository $faqRepository - */ public function __construct(private readonly FaqRepository $faqRepository) { } diff --git a/packages/ep_products/Classes/Controller/HotelController.php b/packages/ep_products/Classes/Controller/HotelController.php index f874898..e702e67 100644 --- a/packages/ep_products/Classes/Controller/HotelController.php +++ b/packages/ep_products/Classes/Controller/HotelController.php @@ -15,12 +15,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class HotelController extends ActionController { - /** - * @param HotelDataService $hotelDataService - * @param HotelRepository $hotelRepository - * @param ProductRepository $productRepository - * @param ProductDataService $productDataService - */ public function __construct( private readonly HotelDataService $hotelDataService, private readonly HotelRepository $hotelRepository, diff --git a/packages/ep_products/Classes/Controller/MapController.php b/packages/ep_products/Classes/Controller/MapController.php index 1ad7b07..1aa321f 100644 --- a/packages/ep_products/Classes/Controller/MapController.php +++ b/packages/ep_products/Classes/Controller/MapController.php @@ -14,10 +14,6 @@ use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; class MapController extends ActionController { - /** - * @param HotelRepository $hotelRepository - * @param ProductRepository $productRepository - */ public function __construct( private readonly HotelRepository $hotelRepository, private readonly ProductRepository $productRepository, diff --git a/packages/ep_products/Classes/Controller/ProductController.php b/packages/ep_products/Classes/Controller/ProductController.php index 3f94223..19fc90f 100644 --- a/packages/ep_products/Classes/Controller/ProductController.php +++ b/packages/ep_products/Classes/Controller/ProductController.php @@ -20,16 +20,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class ProductController extends ActionController { - /** - * @param ProductRepository $productRepository - * @param ProductDataService $productDataService - * @param HotelRepository $hotelRepository - * @param HotelDataService $hotelDataService - * @param DateService $dateService - * @param FilterService $filterService - * @param InfoboxRepository $infoboxRepository - * @param PickupOverviewService $pickupOverviewService - */ public function __construct( private readonly ProductRepository $productRepository, private readonly ProductDataService $productDataService, @@ -141,9 +131,6 @@ class ProductController extends ActionController return $this->htmlResponse(); } - /** - * @param Product $product - */ public function hotelListAction(Product $product): ResponseInterface { $hotels = $this->hotelDataService->getList($product); diff --git a/packages/ep_products/Classes/Controller/RegionController.php b/packages/ep_products/Classes/Controller/RegionController.php index 718d30d..667fb03 100644 --- a/packages/ep_products/Classes/Controller/RegionController.php +++ b/packages/ep_products/Classes/Controller/RegionController.php @@ -12,10 +12,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class RegionController extends ActionController { - /** - * @param RegionRepository $regionRepository - * @param ProductDataService $productDataService - */ public function __construct( private readonly RegionRepository $regionRepository, private readonly ProductDataService $productDataService, diff --git a/packages/ep_products/Classes/Controller/SearchController.php b/packages/ep_products/Classes/Controller/SearchController.php index 48257f0..d38ea80 100644 --- a/packages/ep_products/Classes/Controller/SearchController.php +++ b/packages/ep_products/Classes/Controller/SearchController.php @@ -22,9 +22,6 @@ class SearchController extends ActionController */ public const SEARCHBAR_PARAMETERS = ['dateFrom', 'dateTo', 'pax', 'destinationType', 'destinationUid', 'priceRange']; - /** - * @param FilterService $filterService - */ public function __construct(private FilterService $filterService, private SearchResultService $searchResultService) { } @@ -64,9 +61,6 @@ class SearchController extends ActionController $this->processFilterSettingsArgument($forcedConceptUids); } - /** - * @param array $filterSettings - */ public function searchresultAction(array $filterSettings): ResponseInterface { $dateSelected = false; diff --git a/packages/ep_products/Classes/Controller/TeamController.php b/packages/ep_products/Classes/Controller/TeamController.php index 95921fc..c6da104 100644 --- a/packages/ep_products/Classes/Controller/TeamController.php +++ b/packages/ep_products/Classes/Controller/TeamController.php @@ -10,9 +10,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class TeamController extends ActionController { - /** - * @param TeammemberRepository $teammemberRepository - */ public function __construct(private readonly TeammemberRepository $teammemberRepository) { } @@ -47,8 +44,6 @@ class TeamController extends ActionController } /** - * @param Teammember $member - * * @return string */ public function coalesceHeader(Teammember $member) diff --git a/packages/ep_products/Classes/Domain/Model/City.php b/packages/ep_products/Classes/Domain/Model/City.php index ecba65a..a5405dc 100644 --- a/packages/ep_products/Classes/Domain/Model/City.php +++ b/packages/ep_products/Classes/Domain/Model/City.php @@ -117,9 +117,6 @@ class City extends AbstractDestination implements TeaserInterface return $this->country; } - /** - * @param Country $country - */ public function setCountry(Country $country) { $this->country = $country; @@ -133,9 +130,6 @@ class City extends AbstractDestination implements TeaserInterface return $this->region; } - /** - * @param Region $region - */ public function setRegion(Region $region) { $this->region = $region; diff --git a/packages/ep_products/Classes/Domain/Model/Concept.php b/packages/ep_products/Classes/Domain/Model/Concept.php index 7833565..6c15d26 100644 --- a/packages/ep_products/Classes/Domain/Model/Concept.php +++ b/packages/ep_products/Classes/Domain/Model/Concept.php @@ -378,17 +378,11 @@ class Concept extends AbstractEntity implements TeaserInterface $this->images = $images; } - /** - * @param Product $product - */ public function addProduct(Product $product) { $this->products->attach($product); } - /** - * @param Product $product - */ public function removeProduct(Product $product) { $this->products->detach($product); diff --git a/packages/ep_products/Classes/Domain/Model/Country.php b/packages/ep_products/Classes/Domain/Model/Country.php index bc1de4e..50d94bf 100644 --- a/packages/ep_products/Classes/Domain/Model/Country.php +++ b/packages/ep_products/Classes/Domain/Model/Country.php @@ -69,17 +69,11 @@ class Country extends AbstractDestination implements TeaserInterface $this->descriptionExtended = $descriptionExtended; } - /** - * @param Fact $fact - */ public function addFact(Fact $fact) { $this->facts->attach($fact); } - /** - * @param Fact $factToRemove - */ public function removeFact(Fact $factToRemove) { $this->facts->detach($factToRemove); diff --git a/packages/ep_products/Classes/Domain/Model/Date.php b/packages/ep_products/Classes/Domain/Model/Date.php index 3d929a6..77ee6c1 100644 --- a/packages/ep_products/Classes/Domain/Model/Date.php +++ b/packages/ep_products/Classes/Domain/Model/Date.php @@ -283,9 +283,6 @@ class Date extends AbstractEntity return $this->dateStart; } - /** - * @param \DateTime $dateStart - */ public function setDateStart(\DateTime $dateStart) { $this->dateStart = $dateStart; @@ -299,9 +296,6 @@ class Date extends AbstractEntity return $this->dateEnd; } - /** - * @param \DateTime $dateEnd - */ public function setDateEnd(\DateTime $dateEnd) { $this->dateEnd = $dateEnd; @@ -347,9 +341,6 @@ class Date extends AbstractEntity return $this->boardCode; } - /** - * @param string $boardCode - */ public function setBoardCode(string $boardCode) { $this->boardCode = $boardCode; @@ -363,9 +354,6 @@ class Date extends AbstractEntity return $this->boardBusProId; } - /** - * @param int $boardBusProId - */ public function setBoardBusProId(int $boardBusProId) { $this->boardBusProId = $boardBusProId; @@ -459,9 +447,6 @@ class Date extends AbstractEntity return unserialize($this->servicesIncluded); } - /** - * @param array $servicesIncluded - */ public function setServicesIncluded(array $servicesIncluded) { $this->servicesIncluded = serialize($servicesIncluded); @@ -481,9 +466,6 @@ class Date extends AbstractEntity return $services; } - /** - * @param array $servicesGeneral - */ public function setServicesGeneral(array $servicesGeneral) { $this->servicesGeneral = serialize($servicesGeneral); @@ -522,9 +504,6 @@ class Date extends AbstractEntity return unserialize($this->pickups); } - /** - * @param array $pickups - */ public function setPickups(array $pickups) { $this->pickups = serialize($pickups); diff --git a/packages/ep_products/Classes/Domain/Model/Dto/FilterOptions.php b/packages/ep_products/Classes/Domain/Model/Dto/FilterOptions.php index 2442f14..7c472c6 100644 --- a/packages/ep_products/Classes/Domain/Model/Dto/FilterOptions.php +++ b/packages/ep_products/Classes/Domain/Model/Dto/FilterOptions.php @@ -113,9 +113,6 @@ class FilterOptions implements \JsonSerializable return $this->destinations; } - /** - * @param array $destinations - */ public function setDestinations(array $destinations) { $this->destinations = $destinations; @@ -273,9 +270,6 @@ class FilterOptions implements \JsonSerializable return $this->resultCount; } - /** - * @param int $resultCount - */ public function setResultCount(int $resultCount) { $this->resultCount = $resultCount; @@ -289,9 +283,6 @@ class FilterOptions implements \JsonSerializable return $this->resultsUri; } - /** - * @param string $resultsUri - */ public function setResultsUri(string $resultsUri) { $this->resultsUri = $resultsUri; diff --git a/packages/ep_products/Classes/Domain/Model/GroupsPriceBoard.php b/packages/ep_products/Classes/Domain/Model/GroupsPriceBoard.php index 6df2a3c..3dd5d9d 100644 --- a/packages/ep_products/Classes/Domain/Model/GroupsPriceBoard.php +++ b/packages/ep_products/Classes/Domain/Model/GroupsPriceBoard.php @@ -21,33 +21,21 @@ class GroupsPriceBoard extends AbstractEntity implements \JsonSerializable */ protected $priceChf; - /** - * @return string - */ public function getTitle(): string { return $this->title; } - /** - * @param string $title - */ public function setTitle(string $title): void { $this->title = $title; } - /** - * @return float - */ public function getPrice(): float { return $this->price; } - /** - * @param float $price - */ public function setPrice(float $price): void { $this->price = $price; @@ -61,17 +49,11 @@ class GroupsPriceBoard extends AbstractEntity implements \JsonSerializable return $this->priceChf; } - /** - * @param float $price - */ public function setPriceChf(float $price): void { $this->priceChf = $price; } - /** - * @return array - */ public function jsonSerialize(): array { return [ diff --git a/packages/ep_products/Classes/Domain/Model/GroupsPriceConfig.php b/packages/ep_products/Classes/Domain/Model/GroupsPriceConfig.php index 1d73ec6..57d1d34 100644 --- a/packages/ep_products/Classes/Domain/Model/GroupsPriceConfig.php +++ b/packages/ep_products/Classes/Domain/Model/GroupsPriceConfig.php @@ -41,65 +41,41 @@ class GroupsPriceConfig extends AbstractEntity implements \JsonSerializable */ protected $priceAdditionalPersonChf; - /** - * @return \DateTime - */ public function getDateFrom(): \DateTime { return $this->dateFrom; } - /** - * @param \DateTime $dateFrom - */ public function setDateFrom(\DateTime $dateFrom): void { $this->dateFrom = $dateFrom; } - /** - * @return \DateTime - */ public function getDateTo(): \DateTime { return $this->dateTo; } - /** - * @param \DateTime $dateTo - */ public function setDateTo(\DateTime $dateTo): void { $this->dateTo = $dateTo; } - /** - * @return int - */ public function getPersonsIncluded(): int { return $this->personsIncluded; } - /** - * @param int $personsIncluded - */ public function setPersonsIncluded(int $personsIncluded): void { $this->personsIncluded = $personsIncluded; } - /** - * @return float - */ public function getPrice(): float { return $this->price; } - /** - * @param float $price - */ public function setPrice(float $price): void { $this->price = $price; @@ -113,9 +89,6 @@ class GroupsPriceConfig extends AbstractEntity implements \JsonSerializable return $this->priceChf; } - /** - * @param float $price - */ public function setPriceChf(float $price): void { $this->priceChf = $price; @@ -129,9 +102,6 @@ class GroupsPriceConfig extends AbstractEntity implements \JsonSerializable return $this->priceAdditionalPerson; } - /** - * @param float $priceAdditionalPerson - */ public function setPriceAdditionalPerson(float $priceAdditionalPerson): void { $this->priceAdditionalPerson = $priceAdditionalPerson; @@ -145,17 +115,11 @@ class GroupsPriceConfig extends AbstractEntity implements \JsonSerializable return $this->priceAdditionalPersonChf; } - /** - * @param float $priceAdditionalPerson - */ public function setPriceAdditionalPersonChf(float $priceAdditionalPerson): void { $this->priceAdditionalPersonChf = $priceAdditionalPerson; } - /** - * @return array - */ public function jsonSerialize(): array { return [ diff --git a/packages/ep_products/Classes/Domain/Model/GroupsPriceOption.php b/packages/ep_products/Classes/Domain/Model/GroupsPriceOption.php index a279a65..a76033a 100644 --- a/packages/ep_products/Classes/Domain/Model/GroupsPriceOption.php +++ b/packages/ep_products/Classes/Domain/Model/GroupsPriceOption.php @@ -36,33 +36,21 @@ class GroupsPriceOption extends AbstractEntity implements \JsonSerializable */ protected $ignoreWithBoard = false; - /** - * @return string - */ public function getTitle(): string { return $this->title; } - /** - * @param string $title - */ public function setTitle(string $title): void { $this->title = $title; } - /** - * @return float - */ public function getPrice(): float { return $this->price; } - /** - * @param float $price - */ public function setPrice(float $price): void { $this->price = $price; @@ -76,49 +64,31 @@ class GroupsPriceOption extends AbstractEntity implements \JsonSerializable return $this->priceChf; } - /** - * @param float $price - */ public function setPriceChf(float $price): void { $this->priceChf = $price; } - /** - * @return int - */ public function getType(): int { return $this->type; } - /** - * @param int $type - */ public function setType(int $type): void { $this->type = $type; } - /** - * @return bool - */ public function isIgnoreWithBoard(): bool { return $this->ignoreWithBoard; } - /** - * @param bool $ignoreWithBoard - */ public function setIgnoreWithBoard(bool $ignoreWithBoard): void { $this->ignoreWithBoard = $ignoreWithBoard; } - /** - * @return array - */ public function jsonSerialize(): array { return [ diff --git a/packages/ep_products/Classes/Domain/Model/Hotel.php b/packages/ep_products/Classes/Domain/Model/Hotel.php index bed887f..9a2ee36 100644 --- a/packages/ep_products/Classes/Domain/Model/Hotel.php +++ b/packages/ep_products/Classes/Domain/Model/Hotel.php @@ -662,9 +662,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->images; } - /** - * @param ObjectStorage $images - */ public function setImages(ObjectStorage $images) { $this->images = $images; @@ -768,17 +765,11 @@ class Hotel extends AbstractEntity implements TeaserInterface $this->code = $code; } - /** - * @param MatchCode $code - */ public function addAdditionalCode(MatchCode $code) { $this->additionalCodes->attach($code); } - /** - * @param MatchCode $codeToRemove - */ public function removeAdditionalCodes(MatchCode $codeToRemove) { $this->additionalCodes->detach($codeToRemove); @@ -792,9 +783,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->additionalCodes; } - /** - * @param ObjectStorage $codes - */ public function setAdditionalCodes(ObjectStorage $codes) { $this->additionalCodes = $codes; @@ -852,9 +840,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->country; } - /** - * @param Country $country - */ public function setCountry(Country $country) { $this->country = $country; @@ -868,9 +853,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->region; } - /** - * @param Region $region - */ public function setRegion(Region $region) { $this->region = $region; @@ -884,17 +866,11 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->city; } - /** - * @param City $city - */ public function setCity(City $city) { $this->city = $city; } - /** - * @param Teammember $teamer - */ public function addTeamer(Teammember $teamer) { $this->teamer->attach($teamer); @@ -916,25 +892,16 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->teamer; } - /** - * @param ObjectStorage $teamer - */ public function setTeamer(ObjectStorage $teamer) { $this->teamer = $teamer; } - /** - * @param Product $product - */ public function addProduct(Product $product) { $this->products->attach($product); } - /** - * @param Product $product - */ public function removeProduct(Product $product) { $this->products->detach($product); @@ -948,9 +915,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->products; } - /** - * @param ObjectStorage $products - */ public function setProducts(ObjectStorage $products) { $this->products = $products; @@ -963,17 +927,11 @@ class Hotel extends AbstractEntity implements TeaserInterface $this->rooms = $rooms; } - /** - * @param Fact $fact - */ public function addFact(Fact $fact) { $this->facts->attach($fact); } - /** - * @param Fact $factToRemove - */ public function removeFact(Fact $factToRemove) { $this->facts->detach($factToRemove); @@ -987,9 +945,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->facts; } - /** - * @param ObjectStorage $facts - */ public function setFacts(ObjectStorage $facts) { $this->facts = $facts; @@ -1051,9 +1006,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->groupsPriceConfigs; } - /** - * @param ObjectStorage $groupPriceConfigs - */ public function setGroupsPriceConfigs(ObjectStorage $groupPriceConfigs) { $this->groupsPriceConfigs = $groupPriceConfigs; @@ -1067,9 +1019,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->groupsPriceOptions; } - /** - * @param ObjectStorage $groupsPriceOptions - */ public function setGroupsPriceOptions(ObjectStorage $groupsPriceOptions) { $this->groupsPriceOptions = $groupsPriceOptions; @@ -1083,9 +1032,6 @@ class Hotel extends AbstractEntity implements TeaserInterface return $this->groupsPriceBoards; } - /** - * @param ObjectStorage $groupsPriceBoards - */ public function setGroupsPriceBoards(ObjectStorage $groupsPriceBoards) { $this->groupsPriceBoards = $groupsPriceBoards; diff --git a/packages/ep_products/Classes/Domain/Model/Officetip.php b/packages/ep_products/Classes/Domain/Model/Officetip.php index 1a206e1..c391933 100644 --- a/packages/ep_products/Classes/Domain/Model/Officetip.php +++ b/packages/ep_products/Classes/Domain/Model/Officetip.php @@ -62,9 +62,6 @@ class Officetip extends AbstractEntity return $this->author; } - /** - * @param Teammember $author - */ public function setAuthor(Teammember $author) { $this->author = $author; diff --git a/packages/ep_products/Classes/Domain/Model/Product.php b/packages/ep_products/Classes/Domain/Model/Product.php index 4a133e3..4f7c071 100644 --- a/packages/ep_products/Classes/Domain/Model/Product.php +++ b/packages/ep_products/Classes/Domain/Model/Product.php @@ -876,9 +876,6 @@ class Product extends AbstractEntity implements TeaserInterface return $this->concept; } - /** - * @param Concept $concept - */ public function setConcepts(Concept $concept) { $this->concept = $concept; @@ -892,9 +889,6 @@ class Product extends AbstractEntity implements TeaserInterface return $this->country; } - /** - * @param Country $country - */ public function setCountry(Country $country) { $this->country = $country; @@ -908,9 +902,6 @@ class Product extends AbstractEntity implements TeaserInterface return $this->region; } - /** - * @param Region $region - */ public function setRegion(Region $region) { $this->region = $region; @@ -924,9 +915,6 @@ class Product extends AbstractEntity implements TeaserInterface return $this->city; } - /** - * @param City $city - */ public function setCity(City $city) { $this->city = $city; @@ -964,17 +952,11 @@ class Product extends AbstractEntity implements TeaserInterface $this->facts = $facts; } - /** - * @param Hotel $hotel - */ public function addHotel(Hotel $hotel) { $this->hotels->attach($hotel); } - /** - * @param Hotel $hotel - */ public function removeHotel(Hotel $hotel) { $this->hotels->detach($hotel); @@ -1131,9 +1113,6 @@ class Product extends AbstractEntity implements TeaserInterface return $this->nonBookableDates; } - /** - * @return int - */ public function getMinPrice(): int { return $this->minPrice; diff --git a/packages/ep_products/Classes/Domain/Model/Region.php b/packages/ep_products/Classes/Domain/Model/Region.php index 130769b..d0d11a9 100644 --- a/packages/ep_products/Classes/Domain/Model/Region.php +++ b/packages/ep_products/Classes/Domain/Model/Region.php @@ -279,9 +279,6 @@ class Region extends AbstractDestination implements TeaserInterface return $this->country; } - /** - * @param Country $country - */ public function setCountry(Country $country) { $this->country = $country; diff --git a/packages/ep_products/Classes/Domain/Model/SearchResult.php b/packages/ep_products/Classes/Domain/Model/SearchResult.php index 70e3b96..ddb6709 100644 --- a/packages/ep_products/Classes/Domain/Model/SearchResult.php +++ b/packages/ep_products/Classes/Domain/Model/SearchResult.php @@ -6,7 +6,6 @@ class SearchResult { /** - * @param array $data * @param int $total */ public function __construct(private array $data = [], private $total = 0) diff --git a/packages/ep_products/Classes/Domain/Model/Snowreport.php b/packages/ep_products/Classes/Domain/Model/Snowreport.php index 8083574..f62ef80 100644 --- a/packages/ep_products/Classes/Domain/Model/Snowreport.php +++ b/packages/ep_products/Classes/Domain/Model/Snowreport.php @@ -301,17 +301,11 @@ class Snowreport extends AbstractEntity $this->lastUpdate = $lastUpdate; } - /** - * @param Webcam $webcam - */ public function addWebcam(Webcam $webcam) { $this->webcams->attach($webcam); } - /** - * @param Webcam $webcam - */ public function removeWebcam(Webcam $webcam) { $this->webcams->detach($webcam); diff --git a/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php b/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php index 2fc7bb6..1513f42 100644 --- a/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php +++ b/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php @@ -25,7 +25,6 @@ abstract class AbstractRepository extends Repository } /** - * @param array $uids * @return QueryResultInterface * @throws InvalidQueryException */ diff --git a/packages/ep_products/Classes/Domain/Repository/HotelRepository.php b/packages/ep_products/Classes/Domain/Repository/HotelRepository.php index 1d1a35c..f6ff838 100644 --- a/packages/ep_products/Classes/Domain/Repository/HotelRepository.php +++ b/packages/ep_products/Classes/Domain/Repository/HotelRepository.php @@ -74,7 +74,6 @@ class HotelRepository extends AbstractRepository } /** - * @param array $criteria * @return array * @throws \Doctrine\DBAL\DBALException */ @@ -126,8 +125,6 @@ class HotelRepository extends AbstractRepository } /** - * @param array $criteria - * @param array $excludedHotelUids * @return array * @throws \Doctrine\DBAL\DBALException */ diff --git a/packages/ep_products/Classes/Domain/Repository/TeammemberRepository.php b/packages/ep_products/Classes/Domain/Repository/TeammemberRepository.php index d8cbf35..2f9e491 100644 --- a/packages/ep_products/Classes/Domain/Repository/TeammemberRepository.php +++ b/packages/ep_products/Classes/Domain/Repository/TeammemberRepository.php @@ -16,7 +16,6 @@ class TeammemberRepository extends AbstractRepository ]; /** - * @param array $categories * @return array|QueryResultInterface * @throws InvalidQueryException */ diff --git a/packages/ep_products/Classes/Domain/Serialization/City.php b/packages/ep_products/Classes/Domain/Serialization/City.php index 8999df6..850c399 100644 --- a/packages/ep_products/Classes/Domain/Serialization/City.php +++ b/packages/ep_products/Classes/Domain/Serialization/City.php @@ -8,7 +8,6 @@ use EP\EpProducts\Utility\SerializationUtility; class City { /** - * @param \EP\EpProducts\Domain\Model\City $entity * @return array */ public static function fromEntity(\EP\EpProducts\Domain\Model\City $entity) diff --git a/packages/ep_products/Classes/Domain/Serialization/Date.php b/packages/ep_products/Classes/Domain/Serialization/Date.php index dfa506b..8f5c259 100644 --- a/packages/ep_products/Classes/Domain/Serialization/Date.php +++ b/packages/ep_products/Classes/Domain/Serialization/Date.php @@ -5,7 +5,6 @@ namespace EP\EpProducts\Domain\Serialization; class Date { /** - * @param array $array * @return array */ public static function fromArray(array $array) diff --git a/packages/ep_products/Classes/Domain/Serialization/Hotel.php b/packages/ep_products/Classes/Domain/Serialization/Hotel.php index 453ad33..fc3178d 100644 --- a/packages/ep_products/Classes/Domain/Serialization/Hotel.php +++ b/packages/ep_products/Classes/Domain/Serialization/Hotel.php @@ -6,7 +6,6 @@ use EP\EpProducts\Utility\SerializationUtility; class Hotel { /** - * @param \EP\EpProducts\Domain\Model\Hotel $entity * @return array */ public static function fromEntity(\EP\EpProducts\Domain\Model\Hotel $entity) diff --git a/packages/ep_products/Classes/Domain/Serialization/Product.php b/packages/ep_products/Classes/Domain/Serialization/Product.php index d3fedac..98a9128 100644 --- a/packages/ep_products/Classes/Domain/Serialization/Product.php +++ b/packages/ep_products/Classes/Domain/Serialization/Product.php @@ -10,9 +10,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; class Product { /** - * @param \EP\EpProducts\Domain\Model\Product $entity * @param array $imageProcessingInstructions - * @param array $queryData * @return array */ public static function fromEntity diff --git a/packages/ep_products/Classes/Domain/Serialization/Region.php b/packages/ep_products/Classes/Domain/Serialization/Region.php index e57be5c..6af0d1d 100644 --- a/packages/ep_products/Classes/Domain/Serialization/Region.php +++ b/packages/ep_products/Classes/Domain/Serialization/Region.php @@ -8,7 +8,6 @@ use EP\EpProducts\Utility\SerializationUtility; class Region { /** - * @param \EP\EpProducts\Domain\Model\Region $entity * @return array */ public static function fromEntity(\EP\EpProducts\Domain\Model\Region $entity) diff --git a/packages/ep_products/Classes/Domain/Serialization/Room.php b/packages/ep_products/Classes/Domain/Serialization/Room.php index a50a975..45cb5f3 100644 --- a/packages/ep_products/Classes/Domain/Serialization/Room.php +++ b/packages/ep_products/Classes/Domain/Serialization/Room.php @@ -4,7 +4,6 @@ namespace EP\EpProducts\Domain\Serialization; class Room { /** - * @param array $array * @return array */ public static function fromArray(array $array) diff --git a/packages/ep_products/Classes/Domain/Serialization/Services.php b/packages/ep_products/Classes/Domain/Serialization/Services.php index 3f2b1c8..d0c8751 100644 --- a/packages/ep_products/Classes/Domain/Serialization/Services.php +++ b/packages/ep_products/Classes/Domain/Serialization/Services.php @@ -16,7 +16,6 @@ class Services ]; /** - * @param array $array * @return array */ public static function fromArray(array $array) diff --git a/packages/ep_products/Classes/MyEP/ApiClient.php b/packages/ep_products/Classes/MyEP/ApiClient.php index 59d84ef..c0e879d 100644 --- a/packages/ep_products/Classes/MyEP/ApiClient.php +++ b/packages/ep_products/Classes/MyEP/ApiClient.php @@ -286,7 +286,7 @@ class ApiClient implements LoggerAwareInterface ): void { $statusCode = $this->readStatusCode($response, $method, $uri); - if (true === in_array($statusCode, $expectedStatusCodes, true)) { + if (in_array($statusCode, $expectedStatusCodes, true)) { return; } @@ -404,7 +404,7 @@ class ApiClient implements LoggerAwareInterface */ private function getAccessToken(array $config): AccessToken { - if (true === $this->isTokenUsable(static::$accessToken)) { + if ($this->isTokenUsable(static::$accessToken)) { return static::$accessToken; } @@ -413,7 +413,7 @@ class ApiClient implements LoggerAwareInterface $cachedToken = $this->getCache()->get(self::ACCESS_TOKEN_CACHE_IDENTIFIER); if (is_array($cachedToken) && isset($cachedToken['access_token'])) { $token = new AccessToken($cachedToken); - if (true === $this->isTokenUsable($token)) { + if ($this->isTokenUsable($token)) { static::$accessToken = $token; return static::$accessToken; diff --git a/packages/ep_products/Classes/Service/DateImportService.php b/packages/ep_products/Classes/Service/DateImportService.php index d625e4a..7367ad1 100644 --- a/packages/ep_products/Classes/Service/DateImportService.php +++ b/packages/ep_products/Classes/Service/DateImportService.php @@ -82,12 +82,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface 'datesAdded' => [], ]; - /** - * @param ExtensionConfiguration $extensionConfiguration - * @param CacheService $cacheService - * @param ProductImportSource $importSource - * @param RoomTypeResolver $roomTypeResolver - */ public function __construct( ExtensionConfiguration $extensionConfiguration, private CacheService $cacheService, @@ -102,7 +96,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param iterable $rows one row per travel date × hotel, in the shape * of GET /api/exports/products on MyE&P - * @return int * @throws \Doctrine\DBAL\DBALException */ public function import(iterable $rows): int @@ -131,7 +124,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface * each of them imports all of the product's dates. * * @param iterable $rows - * @return int */ private function importProducts(iterable $rows): int { @@ -182,10 +174,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface } /** - * @param string $code - * @param int $busProId * @param array[][] $dates rows grouped by travel date - * @return int */ private function importProduct(string $code, int $busProId, array $dates): int { @@ -236,8 +225,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param array[] $rows one per hotel of the travel date - * @param array $product - * @return int */ private function importDate(array $rows, array $product): int { @@ -258,7 +245,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface continue; } - if ($this->parseHotel($row, $date) !== false) { + if ($this->parseHotel($row, $date)) { $this->db->insert( 'tx_epproducts_domain_model_date_temp', $date @@ -282,11 +269,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface return $dateCount; } - /** - * @param array $product - * @param array $row - * @return array - */ private function createDateRecord(array $product, array $row): array { $dateStart = \DateTime::createFromFormat('Y-m-d', $row['date']['from']); @@ -453,11 +435,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface return $date; } - /** - * @param array $row - * @param array $date - * @return bool - */ private function parseHotel(array $row, array &$date): bool { $code = $row['hotel']['code']; @@ -502,10 +479,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface } /** - * @param array $row * @param int $hotelUid - * @param array $date - * @param array $services */ private function parseRooms(array $row, $hotelUid, array &$date, array $services): void { @@ -607,13 +581,9 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface $date['min_pax'] = $minPax; } - /** - * @param array $services - * @return float - */ private function determineDiscount(array $services): float { - foreach ($services as $key => $section) { + foreach ($services as $section) { foreach ($section as $service) { $price = $this->parseFormattedPrice($service['price']); if ($price < 0) { @@ -627,8 +597,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param array[] $services a service list of a row - * @param bool $skipWithoutPrice - * @return array */ private function parseService(array $services, bool $skipWithoutPrice = false): array { @@ -687,8 +655,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param array[] $selectionGroups - * @param int $busProId - * @return array */ private function parseSelectionGroup(array $selectionGroups, int $busProId): array { @@ -706,7 +672,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param array[] $selectionGroups - * @return array */ private function parsePersonnelSelectionGroup(array $selectionGroups): array { @@ -730,9 +695,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * 'Gruppenkunde' and 'Endkunde' decide. A date carrying neither is judged by * its travel code. - * - * @param array $row - * @return bool */ private function isGroupTravel(array $row): bool { @@ -749,8 +711,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * Reports dates whose customer selection is missing or contradictory, along * with what they import as. - * - * @param array $row */ private function checkCustomerSelection(array $row): void { @@ -772,7 +732,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param array[] $selections - * @param array $data */ private function addSelections(array $selections, array &$data): void { @@ -781,10 +740,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface } } - /** - * @param array $services - * @param array $date - */ private function processBusConditions(array $services, array &$date): void { if (!array_key_exists('BUS', $services)) { @@ -805,7 +760,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface * offset is still accepted and converted to Europe/Berlin, which cannot * express a time inside the daylight saving gap. * - * @param string $datetime * @return string[] date as d.m.Y and time as H:i */ private function parsePickupDateTime(string $datetime): array @@ -821,9 +775,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * Reads back a price parseService() formatted for display ("1.234,50"). - * - * @param string $price - * @return float */ private function parseFormattedPrice(string $price): float { @@ -872,7 +823,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param string $table * @param int $uid - * @return string */ private function getTopFactForRecord($table, $uid): string { @@ -888,10 +838,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface return $this->db->fetchOne($sql, ['uid' => $uid]); } - /** - * @param array $services - * @param array $list - */ private function addServices(array $services, array &$list): void { foreach ($services as $key => $section) { diff --git a/packages/ep_products/Classes/Service/DateService.php b/packages/ep_products/Classes/Service/DateService.php index 9f3eb39..e32b623 100644 --- a/packages/ep_products/Classes/Service/DateService.php +++ b/packages/ep_products/Classes/Service/DateService.php @@ -4,13 +4,11 @@ namespace EP\EpProducts\Service; use EP\EpProducts\Domain\Model\Date; use EP\EpProducts\Domain\Model\Hotel; use EP\EpProducts\Domain\Model\Product; -use EP\EpProducts\Domain\Repository\DateRepository; use EP\EpProducts\Domain\Repository\ProductRepository; use EP\EpProducts\Utility\BookingUrlUtility; use Symfony\Component\OptionsResolver\OptionsResolver; use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder; class DateService implements SingletonInterface { @@ -38,23 +36,13 @@ class DateService implements SingletonInterface 'VE8' => 'VER', ]; - /** - * @param ProductRepository $productRepository - * @param DateRepository $dateRepository - * @param FilterService $filterService - * @param UriBuilder $uriBuilder - */ public function __construct( private readonly ProductRepository $productRepository, - private readonly DateRepository $dateRepository, private readonly FilterService $filterService, - private readonly UriBuilder $uriBuilder, ) { } /** - * @param array $options - * @return array * @throws \Doctrine\DBAL\DBALException */ public function getPriceTable(array $options): array @@ -114,9 +102,6 @@ class DateService implements SingletonInterface return $this->productRepository->getAvailableDates($product, $hotel, $filterSettings); } - /** - * @param OptionsResolver $resolver - */ private function configureDatesTableOptions(OptionsResolver $resolver) { $resolver->setDefined(['filterSettings']); @@ -240,7 +225,7 @@ class DateService implements SingletonInterface // Default booking button status is determined by the product $showBookingButton = ($resolvedOptions['showBookingButton'] ?? null); // Check if booking button is disabled for this date - if (true === in_array($row['dateBusProId'], $nonBookableDateUids)) { + if (in_array($row['dateBusProId'], $nonBookableDateUids)) { $showBookingButton = false; } @@ -387,7 +372,6 @@ class DateService implements SingletonInterface * Returns services that appear in every supplied date and services that * appear in at least one supplied date but not all of them. * - * @param array $dates * @return array{allDates: array, someDates: array} */ public function groupIncludedServices(array $dates): array diff --git a/packages/ep_products/Classes/Service/FilterService.php b/packages/ep_products/Classes/Service/FilterService.php index 4d4be49..51cba05 100644 --- a/packages/ep_products/Classes/Service/FilterService.php +++ b/packages/ep_products/Classes/Service/FilterService.php @@ -170,7 +170,7 @@ class FilterService implements SingletonInterface if (null === $dateMax || $item['maxDateEnd'] > $dateMax) { $dateMax = $item['maxDateEnd']; } - if ((bool) $item['busAvailable'] === true) { + if ((bool) $item['busAvailable']) { $busAvailable = true; } foreach ($item['nights'] as $nightsOption) { @@ -310,7 +310,7 @@ class FilterService implements SingletonInterface $dateTo->setTimestamp($settings['dateTo']); $filterSettings['dateTo'] = $dateTo->format('Y-m-d'); } - if (isset($settings['busAvailable']) && (bool) $settings['busAvailable'] === true) { + if (isset($settings['busAvailable']) && (bool) $settings['busAvailable']) { $filterSettings['bus'] = true; } if (array_key_exists('hotelTypes', $settings)) { diff --git a/packages/ep_products/Classes/Service/FilterSettingsEncoder.php b/packages/ep_products/Classes/Service/FilterSettingsEncoder.php index a7025ee..85c527d 100644 --- a/packages/ep_products/Classes/Service/FilterSettingsEncoder.php +++ b/packages/ep_products/Classes/Service/FilterSettingsEncoder.php @@ -59,7 +59,6 @@ class FilterSettingsEncoder * would be read into the wrong setting. Such input is rejected outright * rather than silently producing a shifted - and therefore wrong - result. * - * @param string $data * @return array the decoded settings, or an empty array if $data is malformed */ public function decode(string $data): array diff --git a/packages/ep_products/Classes/Service/HotelDataService.php b/packages/ep_products/Classes/Service/HotelDataService.php index 14fe1ee..03b5e00 100644 --- a/packages/ep_products/Classes/Service/HotelDataService.php +++ b/packages/ep_products/Classes/Service/HotelDataService.php @@ -10,10 +10,6 @@ use TYPO3\CMS\Core\SingletonInterface; class HotelDataService implements SingletonInterface { - /** - * @param HotelRepository $hotelRepository - * @param HotelImageService $hotelImageService - */ public function __construct( private readonly HotelRepository $hotelRepository, private readonly HotelImageService $hotelImageService, @@ -21,8 +17,6 @@ class HotelDataService implements SingletonInterface } /** - * @param Product $product - * * @return array */ public function getList(Product $product) @@ -71,7 +65,6 @@ class HotelDataService implements SingletonInterface } /** - * @param array $criteria * @return array */ public function getTeasersByCriteria(array $criteria) @@ -82,8 +75,6 @@ class HotelDataService implements SingletonInterface } /** - * @param array $criteria - * @param array $excludedHotelUids * @return array */ public function getDateIndependentTeasersByCriteria(array $criteria, array $excludedHotelUids = []) @@ -94,7 +85,6 @@ class HotelDataService implements SingletonInterface } /** - * @param array $teaserData * @return array */ private function preprocessTeaserData(array $teaserData) @@ -153,8 +143,6 @@ class HotelDataService implements SingletonInterface } /** - * @param array $hotelData - * * @return array */ public function preprocessHotelList(array $hotelData) diff --git a/packages/ep_products/Classes/Service/ProductDataService.php b/packages/ep_products/Classes/Service/ProductDataService.php index 89d7c0b..030722b 100644 --- a/packages/ep_products/Classes/Service/ProductDataService.php +++ b/packages/ep_products/Classes/Service/ProductDataService.php @@ -2,29 +2,19 @@ namespace EP\EpProducts\Service; use EP\EpProducts\Domain\Model\Hotel; -use EP\EpProducts\Domain\Repository\HotelRepository; use EP\EpProducts\Domain\Repository\ProductRepository; use TYPO3\CMS\Core\SingletonInterface; class ProductDataService implements SingletonInterface { - /** - * @param ProductRepository $productRepository - * @param HotelRepository $hotelRepository - * @param HotelImageService $hotelImageService - * @param ProductImageService $productImageService - */ public function __construct( private readonly ProductRepository $productRepository, - private readonly HotelRepository $hotelRepository, private readonly HotelImageService $hotelImageService, private readonly ProductImageService $productImageService, ) { } /** - * @param array $filterSettings - * * @return array */ public function getTeaser(array $filterSettings): ?array @@ -39,13 +29,6 @@ class ProductDataService implements SingletonInterface return reset($teasers); } - /** - * @param array $filterSettings - * @param array $excludedConceptUids - * @param int $limit - * - * @return array - */ public function getTeasergroup(array $filterSettings, array $excludedConceptUids = [], int $limit = 0): array { $teaserData = $this->productRepository->getTeasers($filterSettings, $excludedConceptUids); @@ -58,11 +41,6 @@ class ProductDataService implements SingletonInterface return $teasers; } - /** - * @param array $teaserData - * - * @return array - */ public function preprocessTeasergroup(array $teaserData): array { $data = []; @@ -115,11 +93,6 @@ class ProductDataService implements SingletonInterface return $data; } - /** - * @param array $teaserData - * - * @return array - */ public function createTeaserData(array $teaserData): array { $hotelCategory = Hotel::$categoryLabels[$teaserData['hotelCategory']] ?? null; diff --git a/packages/ep_products/Classes/Service/ProductImport.php b/packages/ep_products/Classes/Service/ProductImport.php index 23a64e5..b220698 100644 --- a/packages/ep_products/Classes/Service/ProductImport.php +++ b/packages/ep_products/Classes/Service/ProductImport.php @@ -11,7 +11,6 @@ final readonly class ProductImport { /** * @param iterable $rows - * @param \DateTimeImmutable|null $sourceGeneratedAt * @param string|null $location local directory of an XML export, null otherwise */ public function __construct( diff --git a/packages/ep_products/Classes/Service/ResellerDataService.php b/packages/ep_products/Classes/Service/ResellerDataService.php index a1d6d37..1eb4a58 100644 --- a/packages/ep_products/Classes/Service/ResellerDataService.php +++ b/packages/ep_products/Classes/Service/ResellerDataService.php @@ -19,17 +19,11 @@ class ResellerDataService implements SingletonInterface { use DbConnectionTrait; - /** - * @param ProductRepository $productRepository - */ public function __construct(private ProductRepository $productRepository) { } /** - * @param Reseller $reseller - * @param string $myEpUrl - * @param array|null $imageProcessingInstructions * @param string $type * @return array * @throws \Doctrine\DBAL\DBALException @@ -58,10 +52,6 @@ class ResellerDataService implements SingletonInterface } /** - * @param Product $product - * @param Reseller $reseller - * @param string $myEpUrl - * @param array|null $imageProcessingInstructions * @param string $type * @return array * @throws \Doctrine\DBAL\DBALException @@ -105,8 +95,6 @@ class ResellerDataService implements SingletonInterface } /** - * @param array $dates - * @param string $myEpUrl * @param string|null $paCode * @return array */ diff --git a/packages/ep_products/Classes/Service/RoomTypeResolver.php b/packages/ep_products/Classes/Service/RoomTypeResolver.php index 0f578fc..385dab1 100644 --- a/packages/ep_products/Classes/Service/RoomTypeResolver.php +++ b/packages/ep_products/Classes/Service/RoomTypeResolver.php @@ -71,7 +71,6 @@ class RoomTypeResolver * @param string $code zimmercode * @param string $label zimmertext * @param int $maxPax MaxPax - * @return bool */ public function needsReview(string $code, string $label, int $maxPax): bool { @@ -86,11 +85,6 @@ class RoomTypeResolver return !$this->matchesAny($label, static::LABEL_PATTERNS_SINGLE_USE); } - /** - * @param string $label - * @param array $patterns - * @return bool - */ private function matchesAny(string $label, array $patterns): bool { return array_any($patterns, fn($pattern) => str_contains(mb_strtolower($label), mb_strtolower($pattern))); diff --git a/packages/ep_products/Classes/Service/SearchResultService.php b/packages/ep_products/Classes/Service/SearchResultService.php index 742cd7b..92b255b 100644 --- a/packages/ep_products/Classes/Service/SearchResultService.php +++ b/packages/ep_products/Classes/Service/SearchResultService.php @@ -15,11 +15,6 @@ class SearchResultService implements SingletonInterface public const DESTINATION_TYPE_CITY = 'city'; public const DESTINATION_TYPE_CONCEPT = 'concept'; - /** - * @param ProductRepository $productRepository - * @param HotelImageService $hotelImageService - * @param ProductImageService $productImageService - */ public function __construct( private readonly ProductRepository $productRepository, private readonly HotelImageService $hotelImageService, diff --git a/packages/ep_products/Classes/Utility/SerializationUtility.php b/packages/ep_products/Classes/Utility/SerializationUtility.php index e8f95e6..398a82f 100644 --- a/packages/ep_products/Classes/Utility/SerializationUtility.php +++ b/packages/ep_products/Classes/Utility/SerializationUtility.php @@ -33,7 +33,6 @@ class SerializationUtility } /** - * @param ObjectStorage $images * @param array $processingInstructions * @return array */ diff --git a/packages/ep_theme/Classes/DataProcessing/ContextProcessor.php b/packages/ep_theme/Classes/DataProcessing/ContextProcessor.php index 0376611..9eabc52 100644 --- a/packages/ep_theme/Classes/DataProcessing/ContextProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/ContextProcessor.php @@ -2,7 +2,6 @@ namespace EP\EpTheme\DataProcessing; -use EP\EpProducts\Service\ResellerDataService; use EP\EpProducts\Traits\DbConnectionTrait; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; @@ -13,10 +12,6 @@ class ContextProcessor implements DataProcessorInterface use DbConnectionTrait; /** - * @param ContentObjectRenderer $cObj - * @param array $contentObjectConfiguration - * @param array $processorConfiguration - * @param array $processedData * @return array * @throws \Doctrine\DBAL\DBALException */ @@ -45,17 +40,6 @@ class ContextProcessor implements DataProcessorInterface return $processedData; } - /** - * @return array|bool - * @throws \Doctrine\DBAL\DBALException - */ - private function getResellerData() - { - /** @var ResellerDataService $resellerService */ - $resellerService = GeneralUtility::makeInstance(ResellerDataService::class); - return $resellerService->getResellerForCurrentDomain(); - } - /** * @return string */ diff --git a/packages/ep_theme/Classes/DataProcessing/FlexFormProcessor.php b/packages/ep_theme/Classes/DataProcessing/FlexFormProcessor.php index 3bf99ce..a2599e1 100644 --- a/packages/ep_theme/Classes/DataProcessing/FlexFormProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/FlexFormProcessor.php @@ -11,10 +11,6 @@ class FlexFormProcessor implements DataProcessorInterface { /** - * @param ContentObjectRenderer $cObj - * @param array $contentObjectConfiguration - * @param array $processorConfiguration - * @param array $processedData * * @return array */ diff --git a/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php b/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php index fdbeb31..f28357b 100644 --- a/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php @@ -14,10 +14,6 @@ class SliderProcessor implements DataProcessorInterface use DbConnectionTrait; /** - * @param ContentObjectRenderer $cObj - * @param array $contentObjectConfiguration - * @param array $processorConfiguration - * @param array $processedData * @return array * @throws \Doctrine\DBAL\DBALException */ diff --git a/packages/ep_theme/Classes/DataProcessing/TeaserImageProcessor.php b/packages/ep_theme/Classes/DataProcessing/TeaserImageProcessor.php index c91a7dc..9a3e4f3 100644 --- a/packages/ep_theme/Classes/DataProcessing/TeaserImageProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/TeaserImageProcessor.php @@ -11,10 +11,6 @@ class TeaserImageProcessor implements DataProcessorInterface { /** - * @param ContentObjectRenderer $cObj - * @param array $contentObjectConfiguration - * @param array $processorConfiguration - * @param array $processedData * * @return array */ diff --git a/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php b/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php index 5346fda..a22698b 100644 --- a/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php @@ -20,10 +20,6 @@ class TeaserProcessor implements DataProcessorInterface { /** - * @param ContentObjectRenderer $cObj - * @param array $contentObjectConfiguration - * @param array $processorConfiguration - * @param array $processedData * * @return array */ diff --git a/packages/ep_theme/Classes/Domain/Model/Page.php b/packages/ep_theme/Classes/Domain/Model/Page.php index 5152640..1d92b5d 100644 --- a/packages/ep_theme/Classes/Domain/Model/Page.php +++ b/packages/ep_theme/Classes/Domain/Model/Page.php @@ -6,15 +6,9 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; class Page extends AbstractEntity { - /** - * @var int - */ #[\Override] protected ?int $uid = null; - /** - * @var int - */ #[\Override] protected ?int $pid = null; diff --git a/packages/ep_theme/Classes/Form/AbstractMappedFinisher.php b/packages/ep_theme/Classes/Form/AbstractMappedFinisher.php index ceb56a1..d9c6dd5 100644 --- a/packages/ep_theme/Classes/Form/AbstractMappedFinisher.php +++ b/packages/ep_theme/Classes/Form/AbstractMappedFinisher.php @@ -24,7 +24,7 @@ abstract class AbstractMappedFinisher extends AbstractFinisher } [$remote, $local] = $parts; - if ('' === $remote || '' === $local) { + if ('' === $local) { continue; } @@ -81,7 +81,7 @@ abstract class AbstractMappedFinisher extends AbstractFinisher $collected = []; foreach ($elements as $identifier => $element) { - if (true === in_array($identifier, $skip, true) || false === array_key_exists($identifier, $formValues)) { + if (in_array($identifier, $skip, true) || false === array_key_exists($identifier, $formValues)) { continue; } @@ -94,7 +94,7 @@ abstract class AbstractMappedFinisher extends AbstractFinisher if ('' === $label) { $label = $identifier; } - if (true === array_key_exists($label, $collected)) { + if (array_key_exists($label, $collected)) { $label .= ' (' . $identifier . ')'; } @@ -111,7 +111,7 @@ abstract class AbstractMappedFinisher extends AbstractFinisher */ protected function normalizeValue($value, string $identifier) { - if (true === is_array($value)) { + if (is_array($value)) { $normalized = []; foreach ($value as $item) { $item = $this->normalizeValue($item, $identifier); @@ -133,7 +133,7 @@ abstract class AbstractMappedFinisher extends AbstractFinisher return $resource?->getName(); } - if (true === is_object($value)) { + if (is_object($value)) { $this->logWarning('Form value skipped while collecting labeled values: unsupported type.', [ 'element' => $identifier, 'class' => $value::class, diff --git a/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php index 82be711..cb59a47 100644 --- a/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php @@ -13,7 +13,6 @@ class MyEpUrlViewHelper extends AbstractViewHelper * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext - * @return string */ public function render(): string { diff --git a/packages/ep_theme/Classes/ViewHelpers/PriceViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/PriceViewHelper.php index 10b98bc..0365fe8 100644 --- a/packages/ep_theme/Classes/ViewHelpers/PriceViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/PriceViewHelper.php @@ -27,9 +27,6 @@ class PriceViewHelper extends AbstractViewHelper } /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext * @return string */ public static function renderStatic( diff --git a/rector.php b/rector.php index d52c758..8ab9d94 100644 --- a/rector.php +++ b/rector.php @@ -28,6 +28,7 @@ return RectorConfig::configure() ]) ->withPhpVersion(PhpVersion::PHP_85) ->withPhpSets(php85: true) + ->withPreparedSets(deadCode: true) ->withSets([ Typo3SetList::GENERAL, Typo3LevelSetList::UP_TO_TYPO3_13,