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-core/classes/class-bp-email.php

    r12932 r13372  
    199199         * @since 2.5.0
    200200         *
    201          * @param string $email_type Unique identifier for this type of email.
    202          * @param BP_Email $this Current instance of the email type class.
     201         * @param string   $email_type Unique identifier for this type of email.
     202         * @param BP_Email $email      Current instance of the email type class.
    203203         */
    204204        do_action( 'bp_email', $email_type, $this );
     
    245245         * @since 2.5.0
    246246         *
    247          * @param mixed $property_value Property value.
    248          * @param string $property_name
    249          * @param string $transform How to transform the return value.
    250          *                          Accepts 'raw' (default) or 'replace-tokens'.
    251          * @param BP_Email $this Current instance of the email type class.
     247         * @param mixed    $property_value Property value.
     248         * @param string   $property_name  Property name.
     249         * @param string   $transform      How to transform the return value.
     250         *                                 Accepts 'raw' (default) or 'replace-tokens'.
     251         * @param BP_Email $email          Current instance of the email type class.
    252252         */
    253253        $retval = apply_filters( "bp_email_get_{$property_name}", $this->$property_name, $property_name, $transform, $this );
     
    273273         * @since 2.5.0
    274274         *
    275          * @param string $retval Property value.
    276          * @param string $property_name
    277          * @param string $transform How to transform the return value.
    278          *                          Accepts 'raw' (default) or 'replace-tokens'.
    279          * @param BP_Email $this Current instance of the email type class.
     275         * @param string   $retval        Property value.
     276         * @param string   $property_name Property name.
     277         * @param string   $transform    How to transform the return value.
     278         *                                Accepts 'raw' (default) or 'replace-tokens'.
     279         * @param BP_Email $email        Current instance of the email type class.
    280280         */
    281281        return apply_filters( 'bp_email_get_property', $retval, $property_name, $transform, $this );
     
    551551         *
    552552         * @param string[] $new_headers Key/value pairs of new header name/values (strings).
    553          * @param BP_Email $this Current instance of the email type class.
     553         * @param BP_Email $email      Current instance of the email type class.
    554554         */
    555555        $this->headers = apply_filters( 'bp_email_set_headers', $new_headers, $this );
     
    593593         * @since 2.5.0
    594594         *
    595          * @param BP_Email_Recipient[] $bcc BCC recipients.
     595         * @param BP_Email_Recipient[]     $bcc        BCC recipients.
    596596         * @param string|array|int|WP_User $bcc_address Either a email address, user ID, WP_User object,
    597597         *                                              or an array containing any combination of the above.
    598          * @param string $name Optional. If $bcc_address is a string, this is the recipient's name.
    599          * @param string $operation If "replace", $to_address replaced previous recipients. If "add",
    600          *                          $to_address was added to the array of recipients.
    601          * @param BP_Email $this Current instance of the email type class.
     598         * @param string                   $name        Optional. If $bcc_address is a string, this is the recipient's
     599         *                                              name.
     600         * @param string                   $operation   If "replace", $to_address replaced previous recipients.
     601         *                                              If "add", $to_address was added to the array of recipients.
     602         * @param BP_Email                 $email       Current instance of the email type class.
    602603         */
    603604        $this->bcc = apply_filters( 'bp_email_set_bcc', $bcc, $bcc_address, $name, $operation, $this );
     
    641642         * @since 2.5.0
    642643         *
    643          * @param BP_Email_Recipient[] $cc CC recipients.
     644         * @param BP_Email_Recipient[]     $cc        CC recipients.
    644645         * @param string|array|int|WP_User $cc_address Either a email address, user ID, WP_User object,
    645646         *                                             or an array containing any combination of the above.
    646          * @param string $name Optional. If $cc_address is a string, this is the recipient's name.
    647          * @param string $operation If "replace", $to_address replaced previous recipients. If "add",
    648          *                          $to_address was added to the array of recipients.
    649          * @param BP_Email $this Current instance of the email type class.
     647         * @param string                   $name      Optional. If $cc_address is a string, this is the recipient's name.
     648         * @param string                   $operation If "replace", $to_address replaced previous recipients. If "add",
     649         *                                             $to_address was added to the array of recipients.
     650         * @param BP_Email                 $email      Current instance of the email type class.
    650651         */
    651652        $this->cc = apply_filters( 'bp_email_set_cc', $cc, $cc_address, $name, $operation, $this );
     
    669670         * @since 2.5.0
    670671         *
    671          * @param string $content HTML email content.
    672          * @param BP_Email $this Current instance of the email type class.
     672         * @param string   $content HTML email content.
     673         * @param BP_Email $email  Current instance of the email type class.
    673674         */
    674675        $this->content_html = apply_filters( 'bp_email_set_content_html', $content, $this );
     
    692693         * @since 2.5.0
    693694         *
    694          * @param string $content Plain text email content.
    695          * @param BP_Email $this Current instance of the email type class.
     695         * @param string   $content Plain text email content.
     696         * @param BP_Email $email  Current instance of the email type class.
    696697         */
    697698        $this->content_plaintext = apply_filters( 'bp_email_set_content_plaintext', $content, $this );
     
    721722         * @since 2.5.0
    722723         *
    723          * @param string $content_type Email content type ("html" or "plaintext").
    724          * @param BP_Email $this Current instance of the email type class.
     724         * @param string   $content_type Email content type ("html" or "plaintext").
     725         * @param BP_Email $email        Current instance of the email type class.
    725726         */
    726727        $this->content_type = apply_filters( 'bp_email_set_content_type', $content_type, $this );
     
    749750         * @since 2.5.0
    750751         *
    751          * @param BP_Email_Recipient $from Sender details.
     752         * @param BP_Email_Recipient       $from          Sender details.
    752753         * @param string|array|int|WP_User $email_address Either a email address, user ID, or WP_User object.
    753          * @param string $name Optional. If $email_address is a string, this is the recipient's name.
    754          * @param BP_Email $this Current instance of the email type class.
     754         * @param string                   $name          Optional. If $email_address is a string, this is the
     755         *                                                recipient's name.
     756         * @param BP_Email                 $email         Current instance of the email type class.
    755757         */
    756758        $this->from = apply_filters( 'bp_email_set_from', $from, $email_address, $name, $this );
     
    776778         * @since 2.5.0
    777779         *
    778          * @param WP_Post $post A Post.
    779          * @param BP_Email $this Current instance of the email type class.
     780         * @param WP_Post  $post A Post.
     781         * @param BP_Email $email Current instance of the email type class.
    780782         */
    781783        $this->post_object = apply_filters( 'bp_email_set_post_object', $post, $this );
     
    832834         * @since 2.5.0
    833835         *
    834          * @param BP_Email_Recipient $reply_to "Reply to" recipient.
     836         * @param BP_Email_Recipient       $reply_to      "Reply to" recipient.
    835837         * @param string|array|int|WP_User $email_address Either a email address, user ID, WP_User object,
    836838         *                                                or an array containing any combination of the above.
    837          * @param string $name Optional. If $email_address is a string, this is the recipient's name.
    838          * @param BP_Email $this Current instance of the email type class.
     839         * @param string                   $name          Optional. If $email_address is a string, this is the
     840         *                                                recipient's name.
     841         * @param BP_Email                 $email         Current instance of the email type class.
    839842         */
    840843        $this->reply_to = apply_filters( 'bp_email_set_reply_to', $reply_to, $email_address, $name, $this );
     
    858861         * @since 2.5.0
    859862         *
    860          * @param string $subject Email subject.
    861          * @param BP_Email $this Current instance of the email type class.
     863         * @param string   $subject Email subject.
     864         * @param BP_Email $email  Current instance of the email type class.
    862865         */
    863866        $this->subject = apply_filters( 'bp_email_set_subject', $subject, $this );
     
    884887         * @since 2.5.0
    885888         *
    886          * @param string $template Email template. Assumed to be HTML.
    887          * @param BP_Email $this Current instance of the email type class.
     889         * @param string   $template Email template. Assumed to be HTML.
     890         * @param BP_Email $email    Current instance of the email type class.
    888891         */
    889892        $this->template = apply_filters( 'bp_email_set_template', $template, $this );
     
    932935         * @since 2.5.0
    933936         *
    934          * @param BP_Email_Recipient[] "To" recipients.
    935          * @param string $to_address "To" address.
    936          * @param string $name "To" name.
    937          * @param string $operation If "replace", $to_address replaced previous recipients. If "add",
    938          *                          $to_address was added to the array of recipients.
    939          * @param BP_Email $this Current instance of the email type class.
     937         * @param BP_Email_Recipient[] $to         "To" recipients.
     938         * @param string               $to_address "To" address.
     939         * @param string               $name      "To" name.
     940         * @param string               $operation If "replace", $to_address replaced previous recipients. If "add",
     941         *                                         $to_address was added to the array of recipients.
     942         * @param BP_Email             $email      Current instance of the email type class.
    940943         */
    941944        $this->to = apply_filters( 'bp_email_set_to', $to, $to_address, $name, $operation, $this );
     
    973976         * @param string[] $tokens           Associative pairing of unformatted token
    974977         *                                   names (key) and replacement values (value).
    975          * @param BP_Email $this             Current instance of the email type class.
     978         * @param BP_Email $email            Current instance of the email type class.
    976979         */
    977980        $this->tokens = apply_filters( 'bp_email_set_tokens', $formatted_tokens, $tokens, $this );
     
    10221025         *
    10231026         * @param bool|WP_Error $retval Returns true if validation succesful, else a descriptive WP_Error.
    1024          * @param BP_Email $this Current instance of the email type class.
     1027         * @param BP_Email      $email Current instance of the email type class.
    10251028         */
    10261029        return apply_filters( 'bp_email_validate', $retval, $this );
Note: See TracChangeset for help on using the changeset viewer.