allowed = array_map('strval', $allowed); } public function validate($value) { return \is_scalar($value) && \in_array((string) $value, $this->allowed, true); } public function message() { return __('The :attribute is not one of the accepted values.', 'bit-connect'); } public function setRuleName($ruleName): void { parent::setRuleName('in'); } public function getParamKeys() { return []; } public function setParameterValues($paramKeys, $paramValues): void {} /** * @return string[] */ public function allowed(): array { return $this->allowed; } }