src/Specification/Profile/ProfileIsElite.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Specification\Profile;
  3. use Happyr\DoctrineSpecification\Specification\BaseSpecification;
  4. use Happyr\DoctrineSpecification\Spec;
  5. class ProfileIsElite extends BaseSpecification
  6. {
  7.     public function __construct(
  8.         protected int $minPrice,
  9.         ?string $dqlAlias null
  10.     )
  11.     {
  12.         parent::__construct($dqlAlias);
  13.     }
  14.     /**
  15.      * @inheritDoc
  16.      */
  17.     protected function getSpec()
  18.     {
  19.         return Spec::andX(
  20.             Spec::orX(
  21.                 new ProfileWithTakeOutOneHourPrice($this->minPricenull),
  22.                 new ProfileWithApartmentsOneHourPrice($this->minPricenull)
  23.             ),
  24.             ProfileWithHeight::tall()
  25.         );
  26.     }
  27. }