diff --git a/sources/ElkArte/Mentions/MentionType/AbstractEventBoardAccess.php b/sources/ElkArte/Mentions/MentionType/AbstractEventBoardAccess.php index 5b024df813..3ba2e5c2f2 100644 --- a/sources/ElkArte/Mentions/MentionType/AbstractEventBoardAccess.php +++ b/sources/ElkArte/Mentions/MentionType/AbstractEventBoardAccess.php @@ -13,7 +13,6 @@ namespace ElkArte\Mentions\MentionType; -use ElkArte\Mentions\MentionType\AbstractEventMessage; use ElkArte\Themes\ThemeLoader; use ElkArte\Util; @@ -38,7 +37,7 @@ public function view($type, &$mentions) continue; } - // These things are associated to messages and require permission checks + // These things are associated to message and require permission checks if (empty($row['id_board'])) { $unset_keys[] = $key; diff --git a/sources/ElkArte/Mentions/MentionType/AbstractEventMessage.php b/sources/ElkArte/Mentions/MentionType/AbstractEventMessage.php index 6390dd8bbd..d345301865 100644 --- a/sources/ElkArte/Mentions/MentionType/AbstractEventMessage.php +++ b/sources/ElkArte/Mentions/MentionType/AbstractEventMessage.php @@ -14,7 +14,6 @@ namespace ElkArte\Mentions\MentionType; use ElkArte\HttpReq; -use ElkArte\Mentions\MentionType\EventInterface; use ElkArte\UserInfo; /** @@ -22,28 +21,18 @@ */ abstract class AbstractEventMessage implements EventInterface { - /** - * The identifier of the mention (the name that is stored in the db) - * - * @var string - */ + /** @var string The identifier of the mention (the name that is stored in the db) */ protected static $_type = ''; - /** - * The database object - * - * @var \ElkArte\HttpReq - */ + /** @var \ElkArte\HttpReq The post/get object */ protected $_request = null; - /** - * The current user object - * - * @var \ElkArte\ValuesContainer - */ + /** @var \ElkArte\ValuesContainer The current user object */ protected $user = null; /** + * AbstractEventMessage constructor + * * @param \ElkArte\HttpReq $http_req * @param \ElkArte\UserInfo $user */ diff --git a/sources/ElkArte/Mentions/MentionType/Event/Buddy.php b/sources/ElkArte/Mentions/MentionType/Event/Buddy.php index adc03f04df..b4f2aeea3b 100644 --- a/sources/ElkArte/Mentions/MentionType/Event/Buddy.php +++ b/sources/ElkArte/Mentions/MentionType/Event/Buddy.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class BuddyMention + * Class Buddy * * Handles mentioning of buddies */ diff --git a/sources/ElkArte/Mentions/MentionType/Event/Likemsg.php b/sources/ElkArte/Mentions/MentionType/Event/Likemsg.php index 27f359a816..4365ea6834 100644 --- a/sources/ElkArte/Mentions/MentionType/Event/Likemsg.php +++ b/sources/ElkArte/Mentions/MentionType/Event/Likemsg.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class LikemsgMention + * Class Likemsg * * Handles mentions of likes */ diff --git a/sources/ElkArte/Mentions/MentionType/Event/Mailfail.php b/sources/ElkArte/Mentions/MentionType/Event/Mailfail.php index 0f2cb209c2..ae67f735d9 100644 --- a/sources/ElkArte/Mentions/MentionType/Event/Mailfail.php +++ b/sources/ElkArte/Mentions/MentionType/Event/Mailfail.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\MailfailConfigTrait; /** - * Class MailfailMention + * Class Mailfail * * Handles notifying users who have had email notifications disabled for failure to deliver */ diff --git a/sources/ElkArte/Mentions/MentionType/Event/Mentionmem.php b/sources/ElkArte/Mentions/MentionType/Event/Mentionmem.php index 989a94557a..b4dc205e07 100644 --- a/sources/ElkArte/Mentions/MentionType/Event/Mentionmem.php +++ b/sources/ElkArte/Mentions/MentionType/Event/Mentionmem.php @@ -21,7 +21,7 @@ use ElkArte\NotificationsTask; /** - * Class MentionmemMention + * Class Mentionmem * * Handles the mentioning of members (@ member actions) */ diff --git a/sources/ElkArte/Mentions/MentionType/Event/Quotedmem.php b/sources/ElkArte/Mentions/MentionType/Event/Quotedmem.php index 661a14042e..26775e3d40 100644 --- a/sources/ElkArte/Mentions/MentionType/Event/Quotedmem.php +++ b/sources/ElkArte/Mentions/MentionType/Event/Quotedmem.php @@ -21,7 +21,7 @@ use ElkArte\NotificationsTask; /** - * Class QuotedmemMention + * Class Quotedmem * * Handles mentioning of members whose messages has been quoted */ diff --git a/sources/ElkArte/Mentions/MentionType/Event/Rlikemsg.php b/sources/ElkArte/Mentions/MentionType/Event/Rlikemsg.php index bb0883a2ac..7bd7082479 100644 --- a/sources/ElkArte/Mentions/MentionType/Event/Rlikemsg.php +++ b/sources/ElkArte/Mentions/MentionType/Event/Rlikemsg.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class RlikemsgMention + * Class Rlikemsg * * Handles the notification (or non-notification) of removed likes. */ diff --git a/sources/ElkArte/Mentions/MentionType/Notification/Buddy.php b/sources/ElkArte/Mentions/MentionType/Notification/Buddy.php index 8e4109d987..9651a6083f 100644 --- a/sources/ElkArte/Mentions/MentionType/Notification/Buddy.php +++ b/sources/ElkArte/Mentions/MentionType/Notification/Buddy.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class BuddyMention + * Class Buddy * * Handles mentioning of buddies */ diff --git a/sources/ElkArte/Mentions/MentionType/Notification/Likemsg.php b/sources/ElkArte/Mentions/MentionType/Notification/Likemsg.php index 1f29e9f657..682b95b1d3 100644 --- a/sources/ElkArte/Mentions/MentionType/Notification/Likemsg.php +++ b/sources/ElkArte/Mentions/MentionType/Notification/Likemsg.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class LikemsgMention + * Class Likemsg * * Handles mentions of likes */ diff --git a/sources/ElkArte/Mentions/MentionType/Notification/Mailfail.php b/sources/ElkArte/Mentions/MentionType/Notification/Mailfail.php index 8ab63f75a5..9c1dba5b44 100644 --- a/sources/ElkArte/Mentions/MentionType/Notification/Mailfail.php +++ b/sources/ElkArte/Mentions/MentionType/Notification/Mailfail.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\MailfailConfigTrait; /** - * Class MailfailMention + * Class Mailfail * * Handles notifying users who have had email notifications disabled for failure to deliver */ diff --git a/sources/ElkArte/Mentions/MentionType/Notification/Mentionmem.php b/sources/ElkArte/Mentions/MentionType/Notification/Mentionmem.php index a0addeba3a..71a5758078 100644 --- a/sources/ElkArte/Mentions/MentionType/Notification/Mentionmem.php +++ b/sources/ElkArte/Mentions/MentionType/Notification/Mentionmem.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class MentionmemMention + * Class Mentionmem * * Handles the mentioning of members (@ member actions) */ diff --git a/sources/ElkArte/Mentions/MentionType/Notification/Quotedmem.php b/sources/ElkArte/Mentions/MentionType/Notification/Quotedmem.php index 4e02990517..8c43b532a7 100644 --- a/sources/ElkArte/Mentions/MentionType/Notification/Quotedmem.php +++ b/sources/ElkArte/Mentions/MentionType/Notification/Quotedmem.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class QuotedmemMention + * Class Quotedmem * * Handles mentioning of members whose messages has been quoted */ diff --git a/sources/ElkArte/Mentions/MentionType/Notification/Rlikemsg.php b/sources/ElkArte/Mentions/MentionType/Notification/Rlikemsg.php index 174642c9f6..22acdc3973 100644 --- a/sources/ElkArte/Mentions/MentionType/Notification/Rlikemsg.php +++ b/sources/ElkArte/Mentions/MentionType/Notification/Rlikemsg.php @@ -17,7 +17,7 @@ use ElkArte\Mentions\MentionType\CommonConfigTrait; /** - * Class RlikemsgMention + * Class Rlikemsg * * Handles the notification (or non-notification) of removed likes. */ @@ -41,7 +41,7 @@ public function setUsersToNotify() } else { - // I'm not entirely sure this is necessary, but better safe than sorry at this point. + // I'm not entirely sure if this is necessary, but better safe than sorry at this point. if (isset($this->_task)) { $this->_task->setMembers([]); diff --git a/sources/ElkArte/Mentions/Mentioning.php b/sources/ElkArte/Mentions/Mentioning.php index b31a354a91..83a5f32767 100644 --- a/sources/ElkArte/Mentions/Mentioning.php +++ b/sources/ElkArte/Mentions/Mentioning.php @@ -24,61 +24,29 @@ */ class Mentioning extends AbstractModel { - /** - * Value assumed by a new mention - * - * @const int - */ + /** @const int Value assumed by a new mention */ public const MNEW = 0; - /** - * Value assumed by a mention that has been read - * - * @const int - */ + /** @const int Value assumed by a mention that has been read */ public const READ = 1; - /** - * Value assumed by a mention that has been deleted - * - * @const int - */ + /** @const int Value assumed by a mention that has been deleted */ public const DELETED = 2; - /** - * Value assumed by an unapproved mention - * - * @const int - */ + /** @const int Value assumed by an unapproved mention */ public const UNAPPROVED = 3; - /** - * Will hold all available mention types - * - * @var array - */ + /** @var array Will hold all available mention types */ protected $_known_mentions = array(); - /** - * Will hold all available mention status - * 'new' => 0, 'read' => 1, 'deleted' => 2, 'unapproved' => 3, - * - * @var array - */ + /** @var array Will hold all available mention status + 'new' => 0, 'read' => 1, 'deleted' => 2, 'unapproved' => 3 */ protected $_known_status = array(); - /** - * Holds the instance of the data validation class - * - * @var object - */ + /** @var \ElkArte\DataValidator Holds the instance of the data validation class */ protected $_validator = null; - /** - * Holds the passed data for this instance, is passed through the validator - * - * @var array - */ + /** @var array Holds the passed data for this instance, is passed through the validator */ protected $_data = null; /** @@ -107,12 +75,11 @@ public function __construct($db, $user, $validator, $enabled_mentions = '') /** * Inserts a new mention. * - * @param \ElkArte\Mentions\MentionType\NotificationInterface $mention_obj The object that knows how to store - * the mention in the database + * @param \ElkArte\Mentions\MentionType\NotificationInterface $mention_obj The object that knows + * how to store the mention in the database * @param mixed[] $data must contain uid, type and msg at a minimum * * @return int[] - * @throws \ElkArte\Exceptions\Exception */ public function create($mention_obj, $data) { @@ -230,7 +197,6 @@ protected function _isValid() * @param int $status * @param int $member_id * @package Mentions - * @throws \ElkArte\Exceptions\Exception */ protected function _updateMenuCount($status, $member_id) { @@ -260,7 +226,6 @@ protected function _updateMenuCount($status, $member_id) * * @param int|int[] $mention_id * @return bool if successfully changed or not - * @throws \ElkArte\Exceptions\Exception */ public function markread($mention_id) { @@ -273,11 +238,10 @@ public function markread($mention_id) * @param int|int[] $items * @param string $mark * @return bool if successfully changed or not - * @throws \ElkArte\Exceptions\Exception */ public function updateStatus($items, $mark) { - // Make sure its all good + // Make sure it is all good $own_id = $this->_getAccessible((array) $items, $mark); if (!empty($own_id)) @@ -342,7 +306,6 @@ protected function _getAccessible($mention_ids, $action) * @param string $status status to update, 'new', 'read', 'deleted', 'unapproved' * @return bool if successfully changed or not * @package Mentions - * @throws \ElkArte\Exceptions\Exception */ protected function _changeStatus($id_mentions, $status = 'read') { @@ -363,6 +326,5 @@ protected function _changeStatus($id_mentions, $status = 'read') } return $success; - require_once(SUBSDIR . '/Mentions.subs.php'); } }