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 <[email protected]>
This commit is contained in:
1 parent
9347112d6b
commit
f4556ee75c
62 files changed
+14
-534
No files matched your search
@@ -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
|
||||
|
||||
@@ -351,7 +351,6 @@ class RecordSerializer
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $infoboxUids
|
||||
* @return array<int, string|null>
|
||||
*/
|
||||
private function findInfoboxTexts(array $infoboxUids): array
|
||||
|
||||
@@ -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'] ?? '');
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 [
|
||||
|
||||
@@ -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 [
|
||||
|
||||
@@ -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 [
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -62,9 +62,6 @@ class Officetip extends AbstractEntity
|
||||
return $this->author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Teammember $author
|
||||
*/
|
||||
public function setAuthor(Teammember $author)
|
||||
{
|
||||
$this->author = $author;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -279,9 +279,6 @@ class Region extends AbstractDestination implements TeaserInterface
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Country $country
|
||||
*/
|
||||
public function setCountry(Country $country)
|
||||
{
|
||||
$this->country = $country;
|
||||
|
||||
@@ -6,7 +6,6 @@ class SearchResult
|
||||
{
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param int $total
|
||||
*/
|
||||
public function __construct(private array $data = [], private $total = 0)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -25,7 +25,6 @@ abstract class AbstractRepository extends Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $uids
|
||||
* @return QueryResultInterface
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@ class TeammemberRepository extends AbstractRepository
|
||||
];
|
||||
|
||||
/**
|
||||
* @param array $categories
|
||||
* @return array|QueryResultInterface
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace EP\EpProducts\Domain\Serialization;
|
||||
class Date
|
||||
{
|
||||
/**
|
||||
* @param array $array
|
||||
* @return array
|
||||
*/
|
||||
public static function fromArray(array $array)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace EP\EpProducts\Domain\Serialization;
|
||||
class Room
|
||||
{
|
||||
/**
|
||||
* @param array $array
|
||||
* @return array
|
||||
*/
|
||||
public static function fromArray(array $array)
|
||||
|
||||
@@ -16,7 +16,6 @@ class Services
|
||||
];
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @return array
|
||||
*/
|
||||
public static function fromArray(array $array)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<array> $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<array> $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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -11,7 +11,6 @@ final readonly class ProductImport
|
||||
{
|
||||
/**
|
||||
* @param iterable<array> $rows
|
||||
* @param \DateTimeImmutable|null $sourceGeneratedAt
|
||||
* @param string|null $location local directory of an XML export, null otherwise
|
||||
*/
|
||||
public function __construct(
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -33,7 +33,6 @@ class SerializationUtility
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ObjectStorage $images
|
||||
* @param array $processingInstructions
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -11,10 +11,6 @@ class FlexFormProcessor implements DataProcessorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -11,10 +11,6 @@ class TeaserImageProcessor implements DataProcessorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -20,10 +20,6 @@ class TeaserProcessor implements DataProcessorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -13,7 +13,6 @@ class MyEpUrlViewHelper extends AbstractViewHelper
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public function render(): string
|
||||
{
|
||||
|
||||
@@ -27,9 +27,6 @@ class PriceViewHelper extends AbstractViewHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user