Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/24/2022 09:33:11 PM (2 years ago)
Author:
imath
Message:

Replace usage of $this in @param tags with a meaningful variable name

Props devutpol, espellcaste

Fixes #8611

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-profiledata.php

    r12888 r13372  
    131131            $retval = true;
    132132        } else {
    133             $bp = buddypress();
     133            $bp     = buddypress();
    134134            $retval = $wpdb->get_row( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = %d", $this->user_id, $this->field_id ) );
    135135        }
     
    140140         * @since 1.2.7
    141141         *
    142          * @param bool                    $retval Whether or not data already exists.
    143          * @param BP_XProfile_ProfileData $this  Instance of the current BP_XProfile_ProfileData class.
     142         * @param bool                    $retval       Whether or not data already exists.
     143         * @param BP_XProfile_ProfileData $profile_data Instance of the current BP_XProfile_ProfileData class.
    144144         */
    145145        return apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, $this ) );
     
    158158        global $wpdb;
    159159
    160         $bp = buddypress();
    161 
     160        $bp     = buddypress();
    162161        $retval = $wpdb->get_row( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE id = %d", $this->field_id ) );
    163162
     
    167166         * @since 1.2.7
    168167         *
    169          * @param bool                    $retval Whether or not data is valid.
    170          * @param BP_XProfile_ProfileData $this  Instance of the current BP_XProfile_ProfileData class.
     168         * @param bool                    $retval       Whether or not data is valid.
     169         * @param BP_XProfile_ProfileData $profile_data Instance of the current BP_XProfile_ProfileData class.
    171170         */
    172171        return apply_filters_ref_array( 'xprofile_data_is_valid_field', array( (bool)$retval, $this ) );
     
    211210         * @since 2.1.0 Added `$reserialize` and `$this` parameters.
    212211         *
    213          * @param string                  $field_value The field value.
    214          * @param int                     $data_id     The field data ID.
    215          * @param bool                    $reserialize Whether to reserialize arrays before returning. Defaults to true.
    216          * @param BP_XProfile_ProfileData $this        Current instance of the profile data being saved.
     212         * @param string                  $field_value  The field value.
     213         * @param int                     $data_id      The field data ID.
     214         * @param bool                    $reserialize  Whether to reserialize arrays before returning. Defaults to true.
     215         * @param BP_XProfile_ProfileData $profile_data Current instance of the profile data being saved.
    217216         */
    218217        $this->value = apply_filters( 'xprofile_data_value_before_save', $this->value, $this->id, true, $this );
     
    235234         * @since 1.0.0
    236235         *
    237          * @param BP_XProfile_ProfileData $this Current instance of the profile data being saved.
     236         * @param BP_XProfile_ProfileData $profile_data Current instance of the profile data being saved.
    238237         */
    239238        do_action_ref_array( 'xprofile_data_before_save', array( $this ) );
     
    261260             * @since 1.0.0
    262261             *
    263              * @param BP_XProfile_ProfileData $this Current instance of the profile data being saved.
     262             * @param BP_XProfile_ProfileData $profile_data Current instance of the profile data being saved.
    264263             */
    265264            do_action_ref_array( 'xprofile_data_after_save', array( $this ) );
     
    290289         * @since 1.9.0
    291290         *
    292          * @param BP_XProfile_ProfileData $this Current instance of the profile data being deleted.
     291         * @param BP_XProfile_ProfileData $profile_data Current instance of the profile data being deleted.
    293292         */
    294293        do_action_ref_array( 'xprofile_data_before_delete', array( $this ) );
     
    304303         * @since 1.9.0
    305304         *
    306          * @param BP_XProfile_ProfileData $this Current instance of the profile data being deleted.
     305         * @param BP_XProfile_ProfileData $profile_data Current instance of the profile data being deleted.
    307306         */
    308307        do_action_ref_array( 'xprofile_data_after_delete', array( $this ) );
Note: See TracChangeset for help on using the changeset viewer.