src/Service/ProfileListSpecificationService.php line 313

Open in your IDE?
  1. <?php
  2. namespace App\Service;
  3. use App\Dto\ProfileListSpecification;
  4. use App\Entity\Location\City;
  5. use App\Entity\Location\County;
  6. use App\Entity\Location\District;
  7. use App\Entity\Location\Station;
  8. use App\Entity\Profile\BodyTypes;
  9. use App\Entity\Profile\BreastTypes;
  10. use App\Entity\Profile\Genders;
  11. use App\Entity\Profile\HairColors;
  12. use App\Entity\Profile\Nationalities;
  13. use App\Entity\Profile\PrivateHaircuts;
  14. use App\Entity\Service;
  15. use App\Entity\ServiceGroups;
  16. use App\Entity\TakeOutLocations;
  17. use App\Repository\DistrictRepository;
  18. use App\Repository\ProfileRepository;
  19. use Doctrine\ORM\EntityManagerInterface;
  20. use App\Repository\ServiceRepository;
  21. use App\Specification\ElasticSearch\ISpecification;
  22. use App\Specification\Profile\BdsmProfile;
  23. use App\Specification\Profile\ProfileAdBoardPlacement;
  24. use App\Specification\Profile\ProfileHasApartments;
  25. use App\Specification\Profile\ProfileHasComments;
  26. use App\Specification\Profile\ProfileHasHighPrice;
  27. use App\Specification\Profile\ProfileHasLowPrice;
  28. use App\Specification\Profile\ProfileHasOnCall;
  29. use App\Specification\Profile\ProfileHasOneOfGenders;
  30. use App\Specification\Profile\ProfileHasPriceGreaterThan;
  31. use App\Specification\Profile\ProfileHasSelfie;
  32. use App\Specification\Profile\ProfileHasVideo;
  33. use App\Specification\Profile\ProfileInMoskowDistricts;
  34. use App\Specification\Profile\ProfileIsActive;
  35. use App\Specification\Profile\ProfileIsApproved;
  36. use App\Specification\Profile\ProfileIsElite;
  37. use App\Specification\Profile\ProfileIsForHour;
  38. use App\Specification\Profile\ProfileIsForNight;
  39. use App\Specification\Profile\ProfileIsGirlfriend;
  40. use App\Specification\Profile\ProfileIsLocated;
  41. use App\Specification\Profile\ProfileIsMasseur;
  42. use App\Specification\Profile\ProfileIsMostExpensive;
  43. use App\Specification\Profile\ProfileIsNew;
  44. use App\Specification\Profile\ProfileIsNice;
  45. use App\Specification\Profile\ProfileIsNotExpensive;
  46. use App\Specification\Profile\ProfileIsNotHidden;
  47. use App\Specification\Profile\ProfileIsProvidingOneOfServices;
  48. use App\Specification\Profile\ProfileIsProvidingTakeOut;
  49. use App\Specification\Profile\ProfileIsRealElite;
  50. use App\Specification\Profile\ProfileIsUpdatedWithinAYear;
  51. use App\Specification\Profile\ProfileIsWithoutPrepayment;
  52. use App\Specification\Profile\ProfileHasWhatsapp;
  53. use App\Specification\Profile\ProfileHasTelegram;
  54. use App\Specification\Profile\ProfileIsEighteenYearsOld;
  55. use App\Specification\Profile\ProfileIsVip;
  56. use App\Specification\Profile\ProfileIsVipIndividual;
  57. use App\Specification\Profile\ProfileIsVipMoskow;
  58. use App\Specification\Profile\ProfileNoRetouch;
  59. use App\Specification\Profile\ProfileWithAge;
  60. use App\Specification\Profile\ProfileWithApartmentsOneHourPrice;
  61. use App\Specification\Profile\ProfileWithBodyType;
  62. use App\Specification\Profile\ProfileWithBreastType;
  63. use App\Specification\Profile\ProfileWithHairColor;
  64. use App\Specification\Profile\ProfileWithHeight;
  65. use App\Specification\Profile\ProfileWithNationality;
  66. use App\Specification\Profile\ProfileWithPrivateHaircut;
  67. use App\Specification\QueryModifier\LimitResult;
  68. use App\Specification\QueryModifier\ProfileAvatar;
  69. use App\Specification\QueryModifier\ProfileOrderedByNightPrice;
  70. use App\Specification\QueryModifier\ProfilePlacementHiding;
  71. use Happyr\DoctrineSpecification\Filter\Filter;
  72. use Happyr\DoctrineSpecification\Logic\AndX;
  73. use Happyr\DoctrineSpecification\Spec;
  74. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
  75. class ProfileListSpecificationService
  76. {
  77.     public function __construct(
  78.         private CountryCurrencyResolver $countryCurrencyResolver,
  79.         private ServiceRepository $serviceRepository,
  80.         private ParameterBagInterface $parameterBag,
  81.         private ProfileRepository $profileRepository,
  82.         private EntityManagerInterface $entityManager,
  83.         private DistrictRepository $districtRepository,
  84.         private Features $features,
  85.     ) {}
  86.     public function listForMasseur(City $city): ProfileListSpecification
  87.     {
  88.         return new ProfileListSpecification(new ProfileIsMasseur(), \App\Specification\ElasticSearch\ProfileIsLocated::withinCity($city));
  89.     }
  90.     public function listByCity(): ProfileListSpecification
  91.     {
  92.         return new ProfileListSpecification(nullnull);
  93.     }
  94.     public function listByCounty(County $county): ProfileListSpecification
  95.     {
  96.         return new ProfileListSpecification(ProfileIsLocated::withinCounty($county), \App\Specification\ElasticSearch\ProfileIsLocated::withinCounty($county));
  97.     }
  98.     public function listByDistrict(District $district): ProfileListSpecification
  99.     {
  100.         return new ProfileListSpecification(ProfileIsLocated::withinDistrict($district), \App\Specification\ElasticSearch\ProfileIsLocated::withinDistrict($district));
  101.     }
  102.     public function listByStation(Station $station): ProfileListSpecification
  103.     {
  104.         return new ProfileListSpecification(ProfileIsLocated::nearStation($station), \App\Specification\ElasticSearch\ProfileIsLocated::nearStations([$station]));
  105.     }
  106.     public function listByStations(array $stations): ProfileListSpecification
  107.     {
  108.         //        $stationIds = explode(',', $stations);
  109.         //        $stations = $this->stationRepository->findBy(['uriIdentity' => $stationIds]);
  110.         return new ProfileListSpecification(new ProfileIsLocated(nullnullnull$stations), \App\Specification\ElasticSearch\ProfileIsLocated::nearStations($stations));
  111.     }
  112.     public function listApproved(): ProfileListSpecification
  113.     {
  114.         return new ProfileListSpecification(new ProfileIsApproved(), new \App\Specification\ElasticSearch\ProfileIsApproved());
  115.     }
  116.     public function listWithoutPrepayment(): ProfileListSpecification
  117.     {
  118.         return new ProfileListSpecification(
  119.             new ProfileIsWithoutPrepayment(),
  120.             new \App\Specification\ElasticSearch\ProfileIsWithoutPrepayment()
  121.         );
  122.     }
  123.     public function listWithWhatsapp(): ProfileListSpecification
  124.     {
  125.         return new ProfileListSpecification(
  126.             new ProfileHasWhatsapp(),
  127.             new \App\Specification\ElasticSearch\ProfileHasWhatsapp()
  128.         );
  129.     }
  130.     public function listWithTelegram(): ProfileListSpecification
  131.     {
  132.         return new ProfileListSpecification(
  133.             new ProfileHasTelegram(),
  134.             new \App\Specification\ElasticSearch\ProfileHasTelegram()
  135.         );
  136.     }
  137.     public function listEighteenYearsOld(): ProfileListSpecification
  138.     {
  139.         return new ProfileListSpecification(
  140.             new ProfileIsEighteenYearsOld(),
  141.             new \App\Specification\ElasticSearch\ProfileIsEighteenYearsOld()
  142.         );
  143.     }
  144.     public function listRublevskie(City $city): ProfileListSpecification
  145.     {
  146.         $stationRepo $this->entityManager->getRepository(\App\Entity\Location\Station::class);
  147.         $stationUris = require __DIR__ '/../../config/rublevskie_stations.php';
  148.         $stations $stationRepo->createQueryBuilder('s')
  149.             ->andWhere('s.city = :city')
  150.             ->andWhere('s.uriIdentity IN (:uris)')
  151.             ->setParameter('city'$city)
  152.             ->setParameter('uris'$stationUris)
  153.             ->getQuery()->getResult();
  154.         return new ProfileListSpecification(
  155.             new \App\Specification\Profile\ProfileIsRublevskie($city$this->entityManager),
  156.             new \App\Specification\ElasticSearch\ProfileIsRublevskie($city$stations)
  157.         );
  158.     }
  159.     public function listWithTattoo(): ProfileListSpecification
  160.     {
  161.         return new ProfileListSpecification(
  162.             new \App\Specification\Profile\ProfileIsHavingTattoo(true),
  163.             new \App\Specification\ElasticSearch\ProfileIsHavingTattoo(true)
  164.         );
  165.     }
  166.     public function listWithPiercing(): ProfileListSpecification
  167.     {
  168.         return new ProfileListSpecification(
  169.             new \App\Specification\Profile\ProfileIsHavingPiercing(true),
  170.             new \App\Specification\ElasticSearch\ProfileIsHavingPiercing(true)
  171.         );
  172.     }
  173.     public function listRoundTheClock(): ProfileListSpecification
  174.     {
  175.         return new ProfileListSpecification(
  176.             new \App\Specification\Profile\ProfileIsRoundTheClock(),
  177.             new \App\Specification\ElasticSearch\ProfileIsRoundTheClock()
  178.         );
  179.     }
  180.     public function listWithComments(): ProfileListSpecification
  181.     {
  182.         return new ProfileListSpecification(new ProfileHasComments(), new \App\Specification\ElasticSearch\ProfileHasComments());
  183.     }
  184.     public function listWithVideo(): ProfileListSpecification
  185.     {
  186.         return new ProfileListSpecification(new ProfileHasVideo(), new \App\Specification\ElasticSearch\ProfileHasVideo());
  187.     }
  188.     public function listWithSelfie(): ProfileListSpecification
  189.     {
  190.         return new ProfileListSpecification(new ProfileHasSelfie(), new \App\Specification\ElasticSearch\ProfileHasSelfie());
  191.     }
  192.     public function listByPrice(City $citystring $priceTypeint $minPrice nullint $maxPrice null): ProfileListSpecification
  193.     {
  194.         $currency $this->countryCurrencyResolver->getCurrencyFor($city->getCountryCode());
  195.         if ($minPrice && $maxPrice) {
  196.             $priceSpec ProfileWithApartmentsOneHourPrice::range($minPrice$maxPrice);
  197.             $recommendationSpec \App\Specification\ElasticSearch\ProfileWithApartmentsOneHourPrice::range($minPrice$maxPrice);
  198.         } elseif ($maxPrice) {
  199.             $priceSpec ProfileWithApartmentsOneHourPrice::cheaperThan($maxPrice);
  200.             $recommendationSpec \App\Specification\ElasticSearch\ProfileWithApartmentsOneHourPrice::cheaperThan($maxPrice);
  201.         } else {
  202.             switch ($priceType) {
  203.                 case 'not_expensive':
  204.                     $priceSpec = new ProfileIsNotExpensive($city);
  205.                     $recommendationSpec = new \App\Specification\ElasticSearch\ProfileIsNotExpensive($currency);
  206.                     break;
  207.                 case 'low':
  208.                     $priceSpec = new ProfileHasLowPrice($city$currency);
  209.                     $recommendationSpec = new \App\Specification\ElasticSearch\ProfileHasLowPrice($city$currency);
  210.                     break;
  211.                 case 'elite':
  212.                     $priceSpec = new ProfileHasHighPrice($city$currency, [
  213.                         'RUB' => 20000,
  214.                     ], [
  215.                         'RUB' => 20000,
  216.                     ]);
  217.                     $recommendationSpec = new \App\Specification\ElasticSearch\ProfileHasHighPrice($city$currency, [], []);
  218.                     break;
  219.                 case 'high':
  220.                 default:
  221.                     $priceSpec = new ProfileHasHighPrice($city$currency);
  222.                     $recommendationSpec = new \App\Specification\ElasticSearch\ProfileHasHighPrice($city$currency);
  223.                     break;
  224.             }
  225.         }
  226.         return new ProfileListSpecification($priceSpec$recommendationSpec);
  227.     }
  228.     public function listByAge(string $ageTypeint $minAge nullint $maxAge null): ProfileListSpecification
  229.     {
  230.         if ($minAge && $maxAge) {
  231.             $ageSpec ProfileWithAge::range($minAge$maxAge);
  232.             $recommendationSpec \App\Specification\ElasticSearch\ProfileWithAge::range($minAge$maxAge);
  233.         } elseif ($minAge) {
  234.             $ageSpec ProfileWithAge::olderThan($minAge);
  235.             $recommendationSpec \App\Specification\ElasticSearch\ProfileWithAge::olderThan($minAge);
  236.         } else {
  237.             switch ($ageType) {
  238.                 case 'old':
  239.                     $ageSpec ProfileWithAge::old();
  240.                     $recommendationSpec \App\Specification\ElasticSearch\ProfileWithAge::old();
  241.                     break;
  242.                 case 'young':
  243.                 default:
  244.                     $ageSpec ProfileWithAge::young();
  245.                     $recommendationSpec \App\Specification\ElasticSearch\ProfileWithAge::young();
  246.                     break;
  247.             }
  248.         }
  249.         return new ProfileListSpecification($ageSpec$recommendationSpec);
  250.     }
  251.     public function listByHeight(string $heightType): ProfileListSpecification
  252.     {
  253.         if ('short' === $heightType) {
  254.             $heightSpec ProfileWithHeight::short();
  255.             $recommendationSpec \App\Specification\ElasticSearch\ProfileWithHeight::short();
  256.         } else {
  257.             $heightSpec ProfileWithHeight::tall();
  258.             $recommendationSpec \App\Specification\ElasticSearch\ProfileWithHeight::tall();
  259.         }
  260.         return new ProfileListSpecification($heightSpec$recommendationSpec);
  261.     }
  262.     public function listByBreastType(string $breastType): ProfileListSpecification
  263.     {
  264.         $breastTypeSpec = new ProfileWithBreastType(BreastTypes::getValueByUriIdentity($breastType));
  265.         return new ProfileListSpecification($breastTypeSpec, new \App\Specification\ElasticSearch\ProfileWithBreastType(BreastTypes::getValueByUriIdentity($breastType)));
  266.     }
  267.     public function listByHairColor(string $hairColor): ProfileListSpecification
  268.     {
  269.         $hairColorSpec = new ProfileWithHairColor(HairColors::getValueByUriIdentity($hairColor));
  270.         return new ProfileListSpecification($hairColorSpec, new \App\Specification\ElasticSearch\ProfileWithHairColor(HairColors::getValueByUriIdentity($hairColor)));
  271.     }
  272.     public function listByBodyType(string $bodyType): ProfileListSpecification
  273.     {
  274.         $bodyTypeSpec = new ProfileWithBodyType(BodyTypes::getValueByUriIdentity($bodyType));
  275.         return new ProfileListSpecification($bodyTypeSpec, new \App\Specification\ElasticSearch\ProfileWithBodyType(BodyTypes::getValueByUriIdentity($bodyType)));
  276.     }
  277.     public function listByPlace(string $placeTypestring $takeOutLocation null): ?ProfileListSpecification
  278.     {
  279.         switch ($placeType) {
  280.             case 'apartments':
  281.                 $placeSpec = new ProfileHasApartments();
  282.                 $recommendationSpec = new \App\Specification\ElasticSearch\ProfileHasApartments();
  283.                 break;
  284.             case 'take-out':
  285.                 $takeOutLocation TakeOutLocations::getValueByUriIdentity($takeOutLocation);
  286.                 $placeSpec = new ProfileIsProvidingTakeOut($takeOutLocation);
  287.                 $recommendationSpec = new \App\Specification\ElasticSearch\ProfileIsProvidingTakeOut($takeOutLocation);
  288.                 break;
  289.             case 'on-call':
  290.                 $placeSpec Spec::andX(
  291.                     new ProfileIsProvidingTakeOut(null),
  292.                     Spec::not(new ProfileHasApartments())
  293.                 );
  294.                 $recommendationSpec \App\Specification\ElasticSearch\Spec::andX(
  295.                     (new \App\Specification\ElasticSearch\ProfileIsProvidingTakeOut(null))->getSpec(),
  296.                     \App\Specification\ElasticSearch\Spec::not((new \App\Specification\ElasticSearch\ProfileHasApartments())->getSpec())
  297.                 );
  298.                 break;
  299.             default:
  300.                 return null;
  301.         }
  302.         return new ProfileListSpecification($placeSpec$recommendationSpec);
  303.     }
  304.     public function listByPrivateHaircut(string $privateHaircut): ProfileListSpecification
  305.     {
  306.         $privateHaircutSpec = new ProfileWithPrivateHaircut(PrivateHaircuts::getValueByUriIdentity($privateHaircut));
  307.         return new ProfileListSpecification($privateHaircutSpec, new \App\Specification\ElasticSearch\ProfileWithPrivateHaircut(PrivateHaircuts::getValueByUriIdentity($privateHaircut)));
  308.     }
  309.     public function listByNationality(string $nationality): ProfileListSpecification
  310.     {
  311.         $nationalitySpec = new ProfileWithNationality(Nationalities::getValueByUriIdentity($nationality));
  312.         return new ProfileListSpecification($nationalitySpec, new \App\Specification\ElasticSearch\ProfileWithNationality(Nationalities::getValueByUriIdentity($nationality)));
  313.     }
  314.     public function listByProvidedService(Service $serviceCity $city): ProfileListSpecification
  315.     {
  316.         $sameGroupServices $this->serviceRepository->findBy(['group' => $service->getGroup()]);
  317.         $spec = new AndX(new ProfileIsProvidingOneOfServices([$service]));
  318.         if ('eskort' == $service->getUriIdentity() && true === $this->features->escort_additional_requirements()) {
  319.             $spec->andX(new ProfileIsApproved());
  320.             $spec->andX(new ProfileHasPriceGreaterThan($city'RUB', [
  321.                 'RUB' => 12000,
  322.             ]));
  323.             $spec->andX(new ProfileIsUpdatedWithinAYear());
  324.         }
  325.         return new ProfileListSpecification($spec, new \App\Specification\ElasticSearch\ProfileIsProvidingOneOfServices($sameGroupServices));
  326.     }
  327.     public function listNew(int $weeks 2): ProfileListSpecification
  328.     {
  329.         return new ProfileListSpecification(new ProfileIsNew($weeks), new \App\Specification\ElasticSearch\ProfileIsNew($weeks));
  330.     }
  331.     public function listByNoRetouch(): ProfileListSpecification
  332.     {
  333.         return new ProfileListSpecification(new ProfileNoRetouch(), new \App\Specification\ElasticSearch\ProfileNoRetouch());
  334.     }
  335.     public function listByNice(): ProfileListSpecification
  336.     {
  337.         return new ProfileListSpecification(new ProfileIsNice(), new \App\Specification\ElasticSearch\ProfileIsNice());
  338.     }
  339.     public function listByOnCall(): ProfileListSpecification
  340.     {
  341.         return new ProfileListSpecification(new ProfileHasOnCall(), new \App\Specification\ElasticSearch\ProfileHasOnCall());
  342.     }
  343.     public function listForHour(): ProfileListSpecification
  344.     {
  345.         return new ProfileListSpecification(new ProfileIsForHour(), new \App\Specification\ElasticSearch\ProfileIsForHour());
  346.     }
  347.     public function listForNight(): ProfileListSpecification
  348.     {
  349.         return new ProfileListSpecification(new ProfileIsForNight(), new \App\Specification\ElasticSearch\ProfileIsForNight());
  350.     }
  351.     private function getSpecForEliteGirls(City $city): Filter
  352.     {
  353.         $minPrice $this->countryCurrencyResolver->getValueByCountryCode($city->getCountryCode(), [
  354.             'RUB' => 5000,
  355.             'UAH' => 1500,
  356.             'USD' => 100,
  357.             'EUR' => 130,
  358.         ]);
  359.         return new ProfileIsElite($minPrice);
  360.     }
  361.     private function getElasticSearchSpecForEliteGirls(City $city): ISpecification
  362.     {
  363.         $minPrice $this->countryCurrencyResolver->getValueByCountryCode($city->getCountryCode(), [
  364.             'RUB' => 5000,
  365.             'UAH' => 1500,
  366.             'USD' => 100,
  367.             'EUR' => 130,
  368.         ]);
  369.         return new \App\Specification\ElasticSearch\ProfileIsElite($minPrice);
  370.     }
  371.     public function listForEliteGirls(City $city): ProfileListSpecification
  372.     {
  373.         $eliteSpec $this->getSpecForEliteGirls($city);
  374.         return new ProfileListSpecification($eliteSpec$this->getElasticSearchSpecForEliteGirls($city));
  375.     }
  376.     public function listForRealElite(City $city): ProfileListSpecification
  377.     {
  378.         $minPrice $this->countryCurrencyResolver->getValueByCountryCode($city->getCountryCode(), [
  379.             'RUB' => 5000,
  380.             'UAH' => 1500,
  381.             'USD' => 100,
  382.             'EUR' => 130,
  383.         ]);
  384.         return new ProfileListSpecification(new ProfileIsRealElite($minPrice), new \App\Specification\ElasticSearch\ProfileIsRealElite($minPrice));
  385.     }
  386.     public function listForVipPros(City $city): ProfileListSpecification
  387.     {
  388.         $minPrice $this->countryCurrencyResolver->getValueByCountryCode($city->getCountryCode(), [
  389.             'RUB' => 4000,
  390.             'UAH' => 1200,
  391.             'USD' => 100,
  392.             'EUR' => 100,
  393.         ]);
  394.         $districts = [];
  395.         foreach (ProfileInMoskowDistricts::$districtsUri as $uri) {
  396.             $districts[] = $this->districtRepository->ofUriIdentityWithinCity($uri$city);
  397.         }
  398.         return new ProfileListSpecification(new ProfileIsVip($city$districts$minPrice), new \App\Specification\ElasticSearch\ProfileIsVip($city$districts$minPrice));
  399.     }
  400.     public function listForVipIndividual(City $city): ProfileListSpecification
  401.     {
  402.         $minPrice $this->countryCurrencyResolver->getValueByCountryCode($city->getCountryCode(), [
  403.             'RUB' => 30000,
  404.             'UAH' => 10000,
  405.             'USD' => 400,
  406.             'EUR' => 400,
  407.         ]);
  408.         return new ProfileListSpecification(new ProfileIsVipIndividual($minPrice), new \App\Specification\ElasticSearch\ProfileIsVipIndividual($minPrice));
  409.     }
  410.     public function listForVipGirlsCity(City $city): ProfileListSpecification
  411.     {
  412.         return new ProfileListSpecification(new ProfileIsVipMoskow($city), new \App\Specification\ElasticSearch\ProfileIsVipMoskow($city));
  413.     }
  414.     public function listOfGirlfriends(): ProfileListSpecification
  415.     {
  416.         return new ProfileListSpecification(new ProfileIsGirlfriend(), new \App\Specification\ElasticSearch\ProfileIsGirlfriend());
  417.     }
  418.     public function listOfMostExpensive(City $city): ProfileListSpecification
  419.     {
  420.         $count intval($this->profileRepository->match(Spec::countOf(Spec::andX(
  421.             ProfileIsLocated::withinCity($city),
  422.             new ProfileHasOneOfGenders([Genders::FEMALE])
  423.         )))[0][1]);
  424.         $criteria Spec::andX(
  425.             $this->features->free_profiles() ? new ProfileIsNotHidden() : new ProfileIsActive(),
  426.             new ProfileAdBoardPlacement(),
  427.             new ProfilePlacementHiding(),
  428.             new ProfileAvatar(),
  429.             ProfileIsLocated::withinCity($city),
  430.             new LimitResult(round($count 10), 0),
  431.             new ProfileOrderedByNightPrice(),
  432.             new ProfileHasOneOfGenders([Genders::FEMALE])
  433.         );
  434.         $profilesTenPercents $this->profileRepository->match($criteria);
  435.         $criteriaProfile end($profilesTenPercents);
  436.         return new ProfileListSpecification(new ProfileIsMostExpensive($criteriaProfile), new \App\Specification\ElasticSearch\ProfileIsMostExpensive($criteriaProfile));
  437.     }
  438.     public function listBdsm(): ProfileListSpecification
  439.     {
  440.         $bdsmIds $this->serviceRepository->findBy(['group' => ServiceGroups::BDSM]);
  441.         return new ProfileListSpecification(null, new \App\Specification\ElasticSearch\ProfileIsProvidingOneOfServices($bdsmIds), [new BdsmProfile($this->parameterBag->get('profile_list.bdsm_page.min_profile_services'))]);
  442.     }
  443.     public function listByGender(string $gender): ProfileListSpecification
  444.     {
  445.         $gender Genders::getValueByUriIdentity($gender);
  446.         $genders = [$gender];
  447.         return new ProfileListSpecification(nullnullnull$genders);
  448.     }
  449.     public function listBigAss(): ProfileListSpecification
  450.     {
  451.         return new ProfileListSpecification(
  452.             new \App\Specification\Profile\ProfileIsBigAss(),
  453.             new \App\Specification\ElasticSearch\ProfileIsBigAss()
  454.         );
  455.     }
  456. }