• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/util/assert.php
  • Класс: BitrixTasksUtilAssert
  • Вызов: Assert::expectIntegerNonNegative
static function expectIntegerNonNegative($arg, $argName = '', $customMsg = '')
{
	if((string) $arg == '' || $arg === false)
		return 0;

	$argInt = intval($arg);
	if(((string) $arg !== (string) $argInt) || $argInt < 0)
		throw new MainArgumentException(self::formMessage('TASKS_ASSERT_INTEGER_NONNEGATIVE_EXPECTED', $argName, $customMsg));

	return $argInt;
}