Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/02/2024 07:12:25 PM (2 years ago)
Author:
espellcaste
Message:

WPCS: Part VIII: miscellaneous fixes for some of the files of the core component.

Follow-up to [13883], [13886], [13887], [13888], [13891], [13892], [13893]

See #9164 and #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-invitation-manager.php

    r13890 r13900  
    373373         * @since 5.0.0
    374374         *
    375          * @see BP_Invitation::get() for a description of accepted parameters.
    376          *
     375         * @param array $args {@see BP_Invitation::get()}.
    377376         * @return array Located invitations.
    378377         */
    … …  
    393392         * @since 8.0.0
    394393         *
    395          * @see BP_Invitation::get_total_count() for a description of accepted parameters.
    396          *
     394         * @param array $args {@see BP_Invitation::get_total_count()}.
    397395         * @return int Total number of invitations.
    398396         */
    … …  
    413411         * @since 5.0.0
    414412         *
    415          * @see BP_Invitation::get() for a description of accepted parameters.
    416          *
     413         * @param array $args {@see BP_Invitation::get()}.
    417414         * @return array Located invitations.
    418415         */
    … …  
    434431         * @since 5.0.0
    435432         *
    436          * @see BP_Invitation::get() for a description of accepted parameters.
    437          *
     433         * @param array $args {@see BP_Invitation::get()}.
    438434         * @return int|bool ID of first found invitation or false if none found.
    439435         */
    … …  
    454450         * @since 5.0.0
    455451         *
    456          * @see BP_Invitation::get() for a description of accepted parameters.
    457          *
     452         * @param array $args {@see BP_Invitation::get()}.
    458453         * @return int|bool ID of existing request or false if none found.
    459454         */
    … …  
    476471         * @since 5.0.0
    477472         *
    478          * @see BP_Invitation::get() for a description of
    479          *      accepted update/where arguments.
    480          *
    481          * @param array $args {
    482          *     Invitation characteristics. Some basic info is required to accept an invitation,
    483          *     because we'll need to accept all similar invitations and requests.
    484          *
    485          *     @type int    $user_id           User ID of the invitee.
    486          *                                     Either 'user_id' or 'invitee_email' is required.
    487          *     @type string $invitee_email     Email address of the invitee.
    488          *                                     Either 'user_id' or 'invitee_email' is required.
    489          *     @type int    $item_id           Item ID of the invitation to accept.
    490          *     @type int    $secondary_item_id Optional. Secondary item ID if needed.
    491          *     @type string $invite_sent       Optional. Defaults to only allowing the
    492          *                                     acceptance of sent invitations.
    493          *     @type string $date_modified     Modified time in 'Y-m-d h:i:s' format, GMT.
    494          *                                     Defaults to current time if not specified.
    495          * }
    496          *
     473         * @param array $args {BP_Invitation::get()}.
    497474         * @return int|bool Number of rows updated on success, false on failure.
    498475         */
    499476        public function accept_invitation( $args = array() ) {
    500 
    501477                $r = bp_parse_args(
    502478                        $args,
    … …  
    539515         * @since 5.0.0
    540516         *
    541          * @see BP_Invitation::get() for a description of
    542          *      accepted update/where arguments.
    543          *
    544          * @param array $args {
    545          *     Invitation characteristics. Some basic info is required to accept an invitation,
    546          *     because we'll need to accept all similar invitations and requests.
    547          *
    548          *     @type int    $user_id           User ID of the invitee.
    549          *     @type int    $item_id           Item ID of the invitation to accept.
    550          *     @type int    $secondary_item_id Optional. Secondary item ID if needed.
    551          *     @type string $date_modified     Modified time in 'Y-m-d h:i:s' format, GMT.
    552          *                                     Defaults to current time if not specified.
    553          * }
    554          *
     517         * @param array $args {BP_Invitation::get()}.
    555518         * @return bool Number of rows updated on success, false on failure.
    556519         */
    557520        public function accept_request( $args = array() ) {
    558 
    559521                $r = bp_parse_args(
    560522                        $args,
    … …  
    594556         * @since 5.0.0
    595557         *
    596          * @see BP_Invitation::get() for a description of
     558         * @see BP_Invitation::update() for a description of
    597559         *      accepted update/where arguments.
    598560         *
    … …  
    607569        public function update_invitation( $update_args = array(), $where_args = array() ) {
    608570                $update_args['class'] = $this->class_name;
     571
    609572                return BP_Invitation::update( $update_args, $where_args );
    610573        }
    … …  
    669632         * @since 5.0.0
    670633         *
    671          * @see BP_Invitation::mark_accepted()
    672          *      for a description of arguments.
    673          *
    674          * @return bool
     634         * @param int   $id   ID of the invitation to mark as accepted.
     635         * @param array $args {@see BP_Invitation::mark_accepted()}.
     636         * @return int|bool Number of rows updated on success, false on failure.
    675637         */
    676638        public function mark_accepted_by_id( $id, $args ) {
    … …  
    685647         * @since 5.0.0
    686648         *
    687          * @see BP_Invitation::mark_accepted_by_data()
    688          *      for a description of arguments.
     649         * @param array $args {BP_Invitation::mark_accepted_by_data()}.
     650         * @return int|bool Number of rows updated on success, false on failure.
    689651         */
    690652        public function mark_accepted( $args ) {
    … …  
    700662         * @since 5.0.0
    701663         *
    702          * @see BP_Invitation::delete for a description of arguments.
    703          *
     664         * @param array $args {BP_Invitation::delete()}.
    704665         * @return int|bool Number of rows deleted on success, false on failure.
    705666         */
    … …  
    717678         * @since 5.0.0
    718679         *
    719          * @see BP_Invitation::delete for a description of arguments.
    720          *
     680         * @param array $args {BP_Invitation::delete()}.
    721681         * @return int|bool Number of rows deleted on success, false on failure.
    722682         */
    … …  
    737697         */
    738698        public function delete_all() {
    739                 return BP_Invitation::delete(
    740                         array(
    741                                 'class' => $this->class_name,
    742                         )
    743                 );
     699                return BP_Invitation::delete( array( 'class' => $this->class_name ) );
    744700        }
    745701
Note: See TracChangeset for help on using the changeset viewer.