Skip to content

Commit

Permalink
Make phpcs happy
Browse files Browse the repository at this point in the history
  • Loading branch information
renatonascalves committed Apr 7, 2024
1 parent 99d01f9 commit ffb5004
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Mutation/Activity/ActivityCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static function mutate_and_get_payload() {
$component = $input['component'];
$error = __( 'Sorry, you are not allowed to perform this action.', 'wp-graphql-buddypress' );

if ( false === is_user_logged_in() || ! empty( $user_id ) && (int) bp_loggedin_user_id() !== (int) $user_id ) {
if ( false === is_user_logged_in() || ( ! empty( $user_id ) && (int) bp_loggedin_user_id() !== (int) $user_id ) ) {
throw new UserError( esc_html( $error ) );
}

Expand Down
14 changes: 8 additions & 6 deletions src/TypeRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,14 @@ static function ( $node, $uri, $context ) {
}

if (
bp_is_active( 'activity' )
&& (
! empty( $array[1] )
&& 'activity' === $array[1]
&& ! empty( $array[3] )
&& is_numeric( $array[3] )
(
bp_is_active( 'activity' )
&& (
! empty( $array[1] )
&& 'activity' === $array[1]
&& ! empty( $array[3] )
&& is_numeric( $array[3] )
)
)
||
(
Expand Down

0 comments on commit ffb5004

Please sign in to comment.