From 65605ce70bc9d8b09a0ded52842a2bd9b5a5d3a5 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Fri, 13 Sep 2024 16:16:36 -0400 Subject: [PATCH] Remove redundant comments for APM event methods --- src/MongoDB/Monitoring/CommandFailedEvent.c | 18 ------------------ src/MongoDB/Monitoring/CommandStartedEvent.c | 16 ---------------- src/MongoDB/Monitoring/CommandSucceededEvent.c | 17 ----------------- 3 files changed, 51 deletions(-) diff --git a/src/MongoDB/Monitoring/CommandFailedEvent.c b/src/MongoDB/Monitoring/CommandFailedEvent.c index b9a13c1ed..bec83a1fa 100644 --- a/src/MongoDB/Monitoring/CommandFailedEvent.c +++ b/src/MongoDB/Monitoring/CommandFailedEvent.c @@ -31,7 +31,6 @@ zend_class_entry* php_phongo_commandfailedevent_ce; PHONGO_DISABLED_CONSTRUCTOR(MongoDB_Driver_Monitoring_CommandFailedEvent) -/* Returns the command name for this event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getCommandName) { php_phongo_commandfailedevent_t* intern; @@ -43,7 +42,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getCommandName) RETVAL_STRING(intern->command_name); } -/* Returns the database name for this event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getDatabaseName) { php_phongo_commandfailedevent_t* intern; @@ -55,7 +53,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getDatabaseName) RETVAL_STRING(intern->database_name); } -/* Returns the event's duration in microseconds */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getDurationMicros) { php_phongo_commandfailedevent_t* intern; @@ -67,7 +64,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getDurationMicro RETURN_LONG(intern->duration_micros); } -/* Returns the error document associated with the event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getError) { php_phongo_commandfailedevent_t* intern; @@ -79,7 +75,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getError) RETURN_ZVAL(&intern->z_error, 1, 0); } -/* Returns this event's host */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getHost) { php_phongo_commandfailedevent_t* intern = Z_COMMANDFAILEDEVENT_OBJ_P(getThis()); @@ -89,7 +84,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getHost) RETVAL_STRING(intern->host.host); } -/* Returns the event's operation ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getOperationId) { php_phongo_commandfailedevent_t* intern; @@ -103,7 +97,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getOperationId) RETVAL_STRING(operation_id); } -/* Returns this event's port */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getPort) { php_phongo_commandfailedevent_t* intern = Z_COMMANDFAILEDEVENT_OBJ_P(getThis()); @@ -113,7 +106,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getPort) RETVAL_LONG(intern->host.port); } -/* Returns the reply document associated with the event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getReply) { php_phongo_commandfailedevent_t* intern; @@ -133,7 +125,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getReply) RETURN_ZVAL(&state.zchild, 0, 1); } -/* Returns the event's request ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getRequestId) { php_phongo_commandfailedevent_t* intern; @@ -147,7 +138,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getRequestId) RETVAL_STRING(request_id); } -/* Returns the Server from which the event originated */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getServer) { php_phongo_commandfailedevent_t* intern; @@ -159,7 +149,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getServer) phongo_server_init(return_value, &intern->manager, intern->server_id); } -/* Returns the event's service ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getServiceId) { php_phongo_commandfailedevent_t* intern = Z_COMMANDFAILEDEVENT_OBJ_P(getThis()); @@ -173,7 +162,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getServiceId) phongo_objectid_new(return_value, &intern->service_id); } -/* Returns the event's server connection ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getServerConnectionId) { php_phongo_commandfailedevent_t* intern = Z_COMMANDFAILEDEVENT_OBJ_P(getThis()); @@ -194,12 +182,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandFailedEvent, getServerConnect RETURN_LONG(intern->server_connection_id); } -/** - * Event thrown when a command has failed to execute. - * - * This class is only constructed internally. - */ - /* MongoDB\Driver\Monitoring\CommandFailedEvent object handlers */ static zend_object_handlers php_phongo_handler_commandfailedevent; diff --git a/src/MongoDB/Monitoring/CommandStartedEvent.c b/src/MongoDB/Monitoring/CommandStartedEvent.c index aa109649b..5c9f7446b 100644 --- a/src/MongoDB/Monitoring/CommandStartedEvent.c +++ b/src/MongoDB/Monitoring/CommandStartedEvent.c @@ -31,7 +31,6 @@ zend_class_entry* php_phongo_commandstartedevent_ce; PHONGO_DISABLED_CONSTRUCTOR(MongoDB_Driver_Monitoring_CommandStartedEvent) -/* Returns the command document associated with the event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getCommand) { php_phongo_commandstartedevent_t* intern; @@ -51,7 +50,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getCommand) RETURN_ZVAL(&state.zchild, 0, 1); } -/* Returns the command name for this event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getCommandName) { php_phongo_commandstartedevent_t* intern; @@ -63,7 +61,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getCommandName) RETVAL_STRING(intern->command_name); } -/* Returns the database name for this event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getDatabaseName) { php_phongo_commandstartedevent_t* intern; @@ -75,7 +72,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getDatabaseName RETVAL_STRING(intern->database_name); } -/* Returns this event's host */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getHost) { php_phongo_commandstartedevent_t* intern = Z_COMMANDSTARTEDEVENT_OBJ_P(getThis()); @@ -85,7 +81,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getHost) RETVAL_STRING(intern->host.host); } -/* Returns the event's operation ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getOperationId) { php_phongo_commandstartedevent_t* intern; @@ -99,7 +94,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getOperationId) RETVAL_STRING(operation_id); } -/* Returns this event's port */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getPort) { php_phongo_commandstartedevent_t* intern = Z_COMMANDSTARTEDEVENT_OBJ_P(getThis()); @@ -109,7 +103,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getPort) RETVAL_LONG(intern->host.port); } -/* Returns the event's request ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getRequestId) { php_phongo_commandstartedevent_t* intern; @@ -123,7 +116,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getRequestId) RETVAL_STRING(request_id); } -/* Returns the Server from which the event originated */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getServer) { php_phongo_commandstartedevent_t* intern; @@ -135,7 +127,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getServer) phongo_server_init(return_value, &intern->manager, intern->server_id); } -/* Returns the event's service ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getServiceId) { php_phongo_commandstartedevent_t* intern = Z_COMMANDSTARTEDEVENT_OBJ_P(getThis()); @@ -149,7 +140,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getServiceId) phongo_objectid_new(return_value, &intern->service_id); } -/* Returns the event's server connection ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getServerConnectionId) { php_phongo_commandstartedevent_t* intern = Z_COMMANDSTARTEDEVENT_OBJ_P(getThis()); @@ -170,12 +160,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandStartedEvent, getServerConnec RETURN_LONG(intern->server_connection_id); } -/** - * Event thrown when a command has started to execute. - * - * This class is only constructed internally. - */ - /* MongoDB\Driver\Monitoring\CommandStartedEvent object handlers */ static zend_object_handlers php_phongo_handler_commandstartedevent; diff --git a/src/MongoDB/Monitoring/CommandSucceededEvent.c b/src/MongoDB/Monitoring/CommandSucceededEvent.c index eb1c4201c..6902a6ef2 100644 --- a/src/MongoDB/Monitoring/CommandSucceededEvent.c +++ b/src/MongoDB/Monitoring/CommandSucceededEvent.c @@ -31,7 +31,6 @@ zend_class_entry* php_phongo_commandsucceededevent_ce; PHONGO_DISABLED_CONSTRUCTOR(MongoDB_Driver_Monitoring_CommandSucceededEvent) -/* Returns the command name for this event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getCommandName) { php_phongo_commandsucceededevent_t* intern; @@ -43,7 +42,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getCommandNam RETVAL_STRING(intern->command_name); } -/* Returns the database name for this event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getDatabaseName) { php_phongo_commandsucceededevent_t* intern; @@ -55,7 +53,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getDatabaseNa RETVAL_STRING(intern->database_name); } -/* Returns the event's duration in microseconds */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getDurationMicros) { php_phongo_commandsucceededevent_t* intern; @@ -67,7 +64,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getDurationMi RETURN_LONG(intern->duration_micros); } -/* Returns this event's host */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getHost) { php_phongo_commandsucceededevent_t* intern = Z_COMMANDSUCCEEDEDEVENT_OBJ_P(getThis()); @@ -77,7 +73,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getHost) RETVAL_STRING(intern->host.host); } -/* Returns the event's operation ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getOperationId) { php_phongo_commandsucceededevent_t* intern; @@ -91,7 +86,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getOperationI RETVAL_STRING(operation_id); } -/* Returns this event's port */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getPort) { php_phongo_commandsucceededevent_t* intern = Z_COMMANDSUCCEEDEDEVENT_OBJ_P(getThis()); @@ -101,7 +95,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getPort) RETVAL_LONG(intern->host.port); } -/* Returns the reply document associated with the event */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getReply) { php_phongo_commandsucceededevent_t* intern; @@ -121,7 +114,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getReply) RETURN_ZVAL(&state.zchild, 0, 1); } -/* Returns the event's request ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getRequestId) { php_phongo_commandsucceededevent_t* intern; @@ -135,7 +127,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getRequestId) RETVAL_STRING(request_id); } -/* Returns the Server from which the event originated */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getServer) { php_phongo_commandsucceededevent_t* intern; @@ -147,7 +138,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getServer) phongo_server_init(return_value, &intern->manager, intern->server_id); } -/* Returns the event's service ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getServiceId) { php_phongo_commandsucceededevent_t* intern = Z_COMMANDSUCCEEDEDEVENT_OBJ_P(getThis()); @@ -161,7 +151,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getServiceId) phongo_objectid_new(return_value, &intern->service_id); } -/* Returns the event's server connection ID */ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getServerConnectionId) { php_phongo_commandsucceededevent_t* intern = Z_COMMANDSUCCEEDEDEVENT_OBJ_P(getThis()); @@ -182,12 +171,6 @@ static PHP_METHOD(MongoDB_Driver_Monitoring_CommandSucceededEvent, getServerConn RETURN_LONG(intern->server_connection_id); } -/** - * Event thrown when a command has succeeded to execute. - * - * This class is only constructed internally. - */ - /* MongoDB\Driver\Monitoring\CommandSucceededEvent object handlers */ static zend_object_handlers php_phongo_handler_commandsucceededevent;