Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/04/2017 06:26:55 PM (9 years ago)
Author:
tw2113
Message:

Cleanup from recent Scrutinizer review around documentation and param/return types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-functions.php

    r11167 r11447  
    9696 *
    9797 * @param int $id ID of the notification to delete.
    98  * @return bool True on success, false on failure.
     98 * @return false|int True on success, false on failure.
    9999 */
    100100function bp_notifications_delete_notification( $id ) {
     
    115115 * @param int      $id     ID of the notification.
    116116 * @param int|bool $is_new 0 for read, 1 for unread.
    117  * @return bool True on success, false on failure.
     117 * @return false|int True on success, false on failure.
    118118 */
    119119function bp_notifications_mark_notification( $id, $is_new = false ) {
     
    362362 * @param string $component_name   Name of the associated component.
    363363 * @param string $component_action Name of the associated action.
    364  * @return bool True on success, false on failure.
     364 * @return int|false True on success, false on failure.
    365365 */
    366366function bp_notifications_delete_notifications_by_type( $user_id, $component_name, $component_action ) {
     
    385385 * @param string   $component_action  Name of the associated action.
    386386 * @param int|bool $secondary_item_id ID of the secondary associated item.
    387  * @return bool True on success, false on failure.
     387 * @return int|false True on success, false on failure.
    388388 */
    389389function bp_notifications_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
     
    408408 * @param string|bool $component_action  Optional. Name of the associated action.
    409409 * @param int|bool    $secondary_item_id Optional. ID of the secondary associated item.
    410  * @return bool True on success, false on failure.
     410 * @return int|false True on success, false on failure.
    411411 */
    412412function bp_notifications_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) {
     
    433433 * @param string $component_name   Name of the associated component.
    434434 * @param string $component_action Name of the associated action.
    435  * @return bool True on success, false on failure.
     435 * @return int|false True on success, false on failure.
    436436 */
    437437function bp_notifications_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
     
    449449 *
    450450 * @param int $user_id ID of the user who is about to be deleted.
    451  * @return int|bool The number of rows deleted, or false on error.
     451 * @return int|false The number of rows deleted, or false on error.
    452452 */
    453453function bp_notifications_delete_notifications_on_user_delete( $user_id ) {
     
    477477 * @param string   $component_action Name of the associated action.
    478478 * @param int|bool $is_new           0 for read, 1 for unread.
    479  * @return bool True on success, false on failure.
     479 * @return int|false True on success, false on failure.
    480480 */
    481481function bp_notifications_mark_notifications_by_type( $user_id, $component_name, $component_action, $is_new = false ) {
     
    506506 * @param int|bool $secondary_item_id ID of the secondary associated item.
    507507 * @param int|bool $is_new            0 for read, 1 for unread.
    508  * @return bool True on success, false on failure.
     508 * @return int|false True on success, false on failure.
    509509 */
    510510function bp_notifications_mark_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false, $is_new = false ) {
     
    535535 * @param int|bool    $secondary_item_id Optional. ID of the secondary associated item.
    536536 * @param int|bool    $is_new            0 for read, 1 for unread.
    537  * @return bool True on success, false on failure.
     537 * @return int|false True on success, false on failure.
    538538 */
    539539function bp_notifications_mark_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false, $is_new = false ) {
     
    566566 * @param string   $component_action Name of the associated action.
    567567 * @param int|bool $is_new           0 for read, 1 for unread.
    568  * @return bool True on success, false on failure.
     568 * @return int|false True on success, false on failure.
    569569 */
    570570function bp_notifications_mark_notifications_from_user( $user_id, $component_name, $component_action, $is_new = false ) {
Note: See TracChangeset for help on using the changeset viewer.