Skip to content

Commit 55eb5b3

Browse files
committed
Fixed clang-format issues
1 parent f0d12d6 commit 55eb5b3

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

php_phongo.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ static void phongo_exception_add_error_labels(bson_t* reply TSRMLS_DC)
209209
bson_iter_recurse(&iter, &error_labels);
210210
while (bson_iter_next(&error_labels)) {
211211
if (BSON_ITER_HOLDS_UTF8(&error_labels)) {
212-
const char* error_label;
213-
uint32_t error_label_len;
212+
const char* error_label;
213+
uint32_t error_label_len;
214214

215215
error_label = bson_iter_utf8(&error_labels, &error_label_len);
216216
#if PHP_VERSION_ID >= 70000
@@ -807,7 +807,7 @@ bool phongo_cursor_advance_and_check_for_error(mongoc_cursor_t* cursor TSRMLS_DC
807807
bool phongo_execute_query(mongoc_client_t* client, const char* namespace, zval* zquery, zval* options, uint32_t server_id, zval* return_value, int return_value_used TSRMLS_DC) /* {{{ */
808808
{
809809
const php_phongo_query_t* query;
810-
bson_t opts = BSON_INITIALIZER;
810+
bson_t opts = BSON_INITIALIZER;
811811
mongoc_cursor_t* cursor;
812812
char* dbname;
813813
char* collname;

src/MongoDB/Exception/RuntimeException.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static bool php_phongo_has_string_array_element(zval* labels, char* label TSRMLS
5252
#else
5353
{
5454
HashPosition pos;
55-
zval** z_label;
55+
zval** z_label;
5656

5757
for (
5858
zend_hash_internal_pointer_reset_ex(ht_data, &pos);
@@ -75,9 +75,9 @@ static bool php_phongo_has_string_array_element(zval* labels, char* label TSRMLS
7575
Returns whether a specific error label has been set */
7676
static PHP_METHOD(RuntimeException, hasErrorLabel)
7777
{
78-
char* label;
79-
phongo_zpp_char_len label_len;
80-
zval* error_labels;
78+
char* label;
79+
phongo_zpp_char_len label_len;
80+
zval* error_labels;
8181
#if PHP_VERSION_ID >= 70000
8282
zval rv;
8383
#endif

src/MongoDB/Manager.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,7 @@ static PHP_METHOD(Manager, startSession)
666666
phongo_throw_exception(
667667
PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC,
668668
"Expected \"defaultTransactionOptions\" option to be an array, %s given",
669-
PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(txn_options)
670-
);
669+
PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(txn_options));
671670
goto cleanup;
672671
}
673672

src/MongoDB/Session.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@
2929

3030
zend_class_entry* php_phongo_session_ce;
3131

32-
#define SESSION_CHECK_LIVELINESS(i,m) \
33-
if (!(i)->client_session) { \
34-
phongo_throw_exception(PHONGO_ERROR_LOGIC TSRMLS_CC, "Cannot call '%s', as the session has already been ended.", (m)); \
35-
return; \
32+
#define SESSION_CHECK_LIVELINESS(i, m) \
33+
if (!(i)->client_session) { \
34+
phongo_throw_exception( \
35+
PHONGO_ERROR_LOGIC TSRMLS_CC, \
36+
"Cannot call '%s', as the session has already been ended.", \
37+
(m)); \
38+
return; \
3639
}
3740

3841
static bool php_phongo_session_get_timestamp_parts(zval* obj, uint32_t* timestamp, uint32_t* increment TSRMLS_DC)
@@ -403,7 +406,6 @@ static PHP_METHOD(Session, isInTransaction)
403406
RETURN_BOOL(mongoc_client_session_in_transaction(intern->client_session));
404407
} /* }}} */
405408

406-
407409
/* {{{ MongoDB\Driver\Session function entries */
408410
ZEND_BEGIN_ARG_INFO_EX(ai_Session_advanceClusterTime, 0, 0, 1)
409411
ZEND_ARG_INFO(0, clusterTime)

0 commit comments

Comments
 (0)