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-core/bp-core-avatars.php

    r13541 r13878  
    537537
    538538                                // Check for current avatar.
    539                                 foreach( $avatar_files as $key => $value ) {
     539                                foreach ( $avatar_files as $key => $value ) {
    540540                                        if ( strpos ( $value, $avatar_size )!== false ) {
    541541                                                $avatar_url = $avatar_folder_url . '/' . $avatar_files[$key];
    … …  
    545545                                // Legacy avatar check.
    546546                                if ( !isset( $avatar_url ) ) {
    547                                         foreach( $avatar_files as $key => $value ) {
     547                                        foreach ( $avatar_files as $key => $value ) {
    548548                                                if ( strpos ( $value, $legacy_user_avatar_name )!== false ) {
    549549                                                        $avatar_url = $avatar_folder_url . '/' . $avatar_files[$key];
    … …  
    553553                                        // Legacy group avatar check.
    554554                                        if ( !isset( $avatar_url ) ) {
    555                                                 foreach( $avatar_files as $key => $value ) {
     555                                                foreach ( $avatar_files as $key => $value ) {
    556556                                                        if ( strpos ( $value, $legacy_group_avatar_name )!== false ) {
    557557                                                                $avatar_url = $avatar_folder_url . '/' . $avatar_files[$key];
    … …  
    23132313        // Add a revision of the current avatar if it's not a mystery man!
    23142314        if ( $current_avatars ) {
    2315                 foreach( $current_avatars as $current_avatar ) {
     2315                foreach ( $current_avatars as $current_avatar ) {
    23162316                        if ( ! isset( $current_avatar->name, $current_avatar->id, $current_avatar->path ) ) {
    23172317                                continue;
    … …  
    23942394                        }
    23952395                } else {
    2396                         foreach( $avatar_types as $type_key => $avatar_path ) {
     2396                        foreach ( $avatar_types as $type_key => $avatar_path ) {
    23972397                                $filename  = wp_basename( $avatar_path );
    23982398                                $avatar_id = pathinfo( $filename, PATHINFO_FILENAME );
Note: See TracChangeset for help on using the changeset viewer.