Skip to content

Commit 5803011

Browse files
committed
Apply code formatting to changes from v1.4
1 parent f5592cc commit 5803011

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

php_phongo.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ bool phongo_parse_read_preference(zval* options, zval** zreadPreference TSRMLS_D
526526
* not NULL, the option will be appended. If zsession is not NULL, it will be
527527
* assigned to the option. On error, false is returned and an exception is
528528
* thrown. */
529-
static bool phongo_parse_session(zval *options, mongoc_client_t* client, bson_t* mongoc_opts, zval** zsession TSRMLS_DC) /* {{{ */
529+
static bool phongo_parse_session(zval* options, mongoc_client_t* client, bson_t* mongoc_opts, zval** zsession TSRMLS_DC) /* {{{ */
530530
{
531531
zval* option = NULL;
532532
const mongoc_client_session_t* client_session;
@@ -727,7 +727,7 @@ bool phongo_execute_query(mongoc_client_t* client, const char* namespace, zval*
727727
char* collname;
728728
mongoc_collection_t* collection;
729729
zval* zreadPreference = NULL;
730-
zval* zsession = NULL;
730+
zval* zsession = NULL;
731731

732732
if (!phongo_split_namespace(namespace, &dbname, &collname)) {
733733
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "%s: %s", "Invalid namespace provided", namespace);
@@ -797,10 +797,10 @@ static bson_t* create_wrapped_command_envelope(const char* db, bson_t* reply)
797797
return tmp;
798798
}
799799

800-
static zval *phongo_create_implicit_session(mongoc_client_t *client TSRMLS_DC) /* {{{ */
800+
static zval* phongo_create_implicit_session(mongoc_client_t* client TSRMLS_DC) /* {{{ */
801801
{
802-
mongoc_client_session_t *cs;
803-
zval *zsession;
802+
mongoc_client_session_t* cs;
803+
zval* zsession;
804804

805805
cs = mongoc_client_start_session(client, NULL, NULL);
806806

@@ -828,10 +828,10 @@ bool phongo_execute_command(mongoc_client_t* client, php_phongo_command_type_t t
828828
bson_t opts = BSON_INITIALIZER;
829829
mongoc_cursor_t* cmd_cursor;
830830
zval* zreadPreference = NULL;
831-
zval* zsession = NULL;
832-
bool result = false;
833-
bool free_reply = false;
834-
bool free_zsession = false;
831+
zval* zsession = NULL;
832+
bool result = false;
833+
bool free_reply = false;
834+
bool free_zsession = false;
835835

836836
command = Z_COMMAND_OBJ_P(zcommand);
837837

@@ -934,8 +934,8 @@ bool phongo_execute_command(mongoc_client_t* client, php_phongo_command_type_t t
934934
/* According to mongoc_cursor_new_from_command_reply(), the reply bson_t
935935
* is ultimately destroyed on both success and failure. */
936936
if (bson_iter_init_find(&iter, &reply, "cursor") && BSON_ITER_HOLDS_DOCUMENT(&iter)) {
937-
bson_t initial_reply = BSON_INITIALIZER;
938-
bson_error_t error = {0};
937+
bson_t initial_reply = BSON_INITIALIZER;
938+
bson_error_t error = { 0 };
939939

940940
bson_copy_to(&reply, &initial_reply);
941941

src/MongoDB/Cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ zend_class_entry* php_phongo_cursor_ce;
3232
* the session. Calling this function during iteration will allow an implicit
3333
* session to return to the pool immediately after a getMore indicates that the
3434
* server has no more results to return. */
35-
static void php_phongo_cursor_free_session_if_exhausted(php_phongo_cursor_t *cursor) /* {{{ */
35+
static void php_phongo_cursor_free_session_if_exhausted(php_phongo_cursor_t* cursor) /* {{{ */
3636
{
3737
if (mongoc_cursor_get_id(cursor->cursor)) {
3838
return;

0 commit comments

Comments
 (0)