Skip to:
Content

bbPress.org

Changeset 6515


Ignore:
Timestamp:
06/10/2017 07:19:27 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Engagements: Remove duplicate type castings from return values.

This removes (bool) usages where there is no way the return value would ever not be a boolean.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/engagements.php

    r6493 r6515  
    203203
    204204    // Filter & return
    205     return (bool) apply_filters( 'bbp_is_user_engaged', (bool) $retval, $user_id, $topic_id );
     205    return (bool) apply_filters( 'bbp_is_user_engaged', $retval, $user_id, $topic_id );
    206206}
    207207
     
    400400
    401401    // Filter & return
    402     return (bool) apply_filters( 'bbp_is_user_favorite', (bool) $retval, $user_id, $topic_id, $favorites );
     402    return (bool) apply_filters( 'bbp_is_user_favorite', $retval, $user_id, $topic_id, $favorites );
    403403}
    404404
     
    765765 * @uses bbp_get_topic_post_type() To get the topic post type
    766766 * @uses apply_filters() Calls 'bbp_is_user_subscribed' with the bool, user id,
    767  *                        forum/topic id and subsriptions
     767 *                        forum/topic id and subscriptions
    768768 * @return bool True if the forum or topic is in user's subscriptions, otherwise false
    769769 */
     
    862862
    863863    // Filter & return
    864     return (bool) apply_filters( 'bbp_is_user_subscribed_to_forum', (bool) $retval, $user_id, $forum_id, $subscribed_ids );
     864    return (bool) apply_filters( 'bbp_is_user_subscribed_to_forum', $retval, $user_id, $forum_id, $subscribed_ids );
    865865}
    866866
     
    920920
    921921    // Filter & return
    922     return (bool) apply_filters( 'bbp_is_user_subscribed_to_topic', (bool) $retval, $user_id, $topic_id, $subscribed_ids );
     922    return (bool) apply_filters( 'bbp_is_user_subscribed_to_topic', $retval, $user_id, $topic_id, $subscribed_ids );
    923923}
    924924
Note: See TracChangeset for help on using the changeset viewer.