Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/01/2024 04:26:18 PM (2 years ago)
Author:
espellcaste
Message:

WPCS: The modified code addresses all Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword and Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction issues specific to the foreach and function examples.

See #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-functions.php

    r13716 r13878  
    104104
    105105        // We've found some mentions! Check to see if users exist.
    106         foreach( (array) array_values( $usernames ) as $username ) {
     106        foreach ( (array) array_values( $usernames ) as $username ) {
    107107                $user_id = bp_activity_get_userid_from_mentionname( $username );
    108108
    … …  
    181181
    182182        // Increment mention count foreach mentioned user.
    183         foreach( (array) array_keys( $usernames ) as $user_id ) {
     183        foreach ( (array) array_keys( $usernames ) as $user_id ) {
    184184                bp_activity_update_mention_count_for_user( $user_id, $activity_id, $action );
    185185        }
    … …  
    32563256                // Recursively delete all children of this comment.
    32573257                if ( ! empty( $children ) ) {
    3258                         foreach( (array) $children as $child ) {
     3258                        foreach ( (array) $children as $child ) {
    32593259                                bp_activity_delete_children( $activity_id, $child->id );
    32603260                        }
    … …  
    38533853
    38543854        // Don't leave multiple notifications for the same activity item.
    3855         foreach( $notifications as $notification ) {
     3855        foreach ( $notifications as $notification ) {
    38563856                if ( $activity_id == $notification->item_id ) {
    38573857                        return;
    … …  
    41224122        buddypress()->activity->read_more_id = $activity->id;
    41234123
    4124         add_filter( 'embed_post_id',         function() { return buddypress()->activity->read_more_id; } );
     4124        add_filter( 'embed_post_id',         function () { return buddypress()->activity->read_more_id; } );
    41254125        add_filter( 'bp_embed_get_cache',    'bp_embed_activity_cache',      10, 3 );
    41264126        add_action( 'bp_embed_update_cache', 'bp_embed_activity_save_cache', 10, 3 );
Note: See TracChangeset for help on using the changeset viewer.