private function validateConstantValue($value)
{
if (null === $value || is_scalar($value)) {
return;
}
if (is_array($value)) {
array_walk($value, [$this, 'validateConstantValue']);
return;
}
throw new Exception\InvalidArgumentException(sprintf('Expected value for constant, value must be a "scalar" or "null", "%s" found', gettype($value)));
}