booleanUtils = $booleanUtils; } /** * {@inheritdoc} * @return string * @throws \InvalidArgumentException */ public function evaluate(array $data) { if (isset($data['value'])) { $result = $data['value']; if (!is_string($result)) { throw new \InvalidArgumentException('String value is expected.'); } } else { $result = ''; } return $result; } }