/** * Validates that the given instance has an ID. * * @param Google\MyBusiness\AbstractAPIResponseObject $obj */ private static function _validateID(AbstractAPIResponseObject $obj) { if (!strlen($obj->getID())) { throw new InvalidArgumentException(get_class($obj) . ' instances must have IDs to be ' . 'used in API queries.'); } }