<?php
namespace App\Model\Query\ConditionQuery\Type;
use App\Model\Query\ConditionQuery\AbstractType;
use App\Model\Query\ConditionQuery\Condition\EqualCondition;
use App\Model\Query\ConditionQuery\Condition\NotEqualCondition;
/**
*
*/
final class BooleanType extends AbstractType
{
const NAME = 'bool';
/**
* {@inheritDoc}
*/
public function validate($value): void
{
// TODO
}
/**
* @return string[]
*/
public function getValidOperators(): array
{
if ($this->allowsMultiple()) {
return [];
}
return [
EqualCondition::NAME => EqualCondition::HUMAN_READABLE_NAME,
NotEqualCondition::NAME => NotEqualCondition::HUMAN_READABLE_NAME,
];
}
}