/**
* Setter for the where argument
*
* @param string|null $value The value to set
*
* @return mixed
*
* @throws BadMethodCallException if the argument is not of the expected type
*/
protected function setWhere($value)
{
if (!empty($value) && !\is_string($value)) {
throw new BadMethodCallException("Argument 'where' of event {$this->name} must be empty or string");
}
return $value;
}