<?php
namespace App\Specification\Profile;
use Happyr\DoctrineSpecification\Specification\BaseSpecification;
use Happyr\DoctrineSpecification\Spec;
class ProfileIsElite extends BaseSpecification
{
public function __construct(
protected int $minPrice,
?string $dqlAlias = null
)
{
parent::__construct($dqlAlias);
}
/**
* @inheritDoc
*/
protected function getSpec()
{
return Spec::andX(
Spec::orX(
new ProfileWithTakeOutOneHourPrice($this->minPrice, null),
new ProfileWithApartmentsOneHourPrice($this->minPrice, null)
),
ProfileWithHeight::tall()
);
}
}