protected function checkIfGreaterOrEqualToZero($name, $value) { if ($value < 0) { throw new \InvalidArgumentException(sprintf('$%s argument must be greater or equal to 0.', $name)); } }