mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/16748] Enable code sniffing for static placement and adjust code
PHPBB3-16748
This commit is contained in:
@@ -150,7 +150,7 @@ class email extends \phpbb\notification\method\messenger_base
|
||||
* @param array $data Notification data
|
||||
* @return array Cleaned notification data
|
||||
*/
|
||||
static public function clean_data(array $data)
|
||||
public static function clean_data(array $data)
|
||||
{
|
||||
$row = [
|
||||
'notification_type_id' => null,
|
||||
|
@@ -36,7 +36,7 @@ class admin_activate_user extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'lang' => 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER',
|
||||
'group' => 'NOTIFICATION_GROUP_ADMINISTRATION',
|
||||
);
|
||||
@@ -68,7 +68,7 @@ class admin_activate_user extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public function get_item_id($user)
|
||||
public static function get_item_id($user)
|
||||
{
|
||||
return (int) $user['user_id'];
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class admin_activate_user extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public function get_item_parent_id($post)
|
||||
public static function get_item_parent_id($post)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ class approve_post extends \phpbb\notification\type\post
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'id' => 'moderation_queue',
|
||||
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
|
@@ -50,7 +50,7 @@ class approve_topic extends \phpbb\notification\type\topic
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'id' => 'moderation_queue',
|
||||
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
|
@@ -48,7 +48,7 @@ abstract class base implements \phpbb\notification\type\type_interface
|
||||
* @var bool|array False if the service should use its default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = false;
|
||||
public static $notification_option = false;
|
||||
|
||||
/**
|
||||
* The notification_type_id, set upon creation of the class
|
||||
|
@@ -43,7 +43,7 @@ class bookmark extends \phpbb\notification\type\post
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'lang' => 'NOTIFICATION_TYPE_BOOKMARK',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
);
|
||||
|
@@ -60,7 +60,7 @@ class disapprove_post extends \phpbb\notification\type\approve_post
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'id' => 'moderation_queue',
|
||||
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
|
@@ -60,7 +60,7 @@ class disapprove_topic extends \phpbb\notification\type\approve_topic
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'id' => 'moderation_queue',
|
||||
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
|
@@ -36,7 +36,7 @@ class forum extends \phpbb\notification\type\post
|
||||
* @var bool|array False if the service should use its default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = [
|
||||
public static $notification_option = [
|
||||
'lang' => 'NOTIFICATION_TYPE_FORUM',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
];
|
||||
|
@@ -26,7 +26,7 @@ class group_request extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'lang' => 'NOTIFICATION_TYPE_GROUP_REQUEST',
|
||||
);
|
||||
|
||||
@@ -58,7 +58,7 @@ class group_request extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public function get_item_id($group)
|
||||
public static function get_item_id($group)
|
||||
{
|
||||
return (int) $group['user_id'];
|
||||
}
|
||||
@@ -66,7 +66,7 @@ class group_request extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public function get_item_parent_id($group)
|
||||
public static function get_item_parent_id($group)
|
||||
{
|
||||
// Group id is the parent
|
||||
return (int) $group['group_id'];
|
||||
|
@@ -34,7 +34,7 @@ class group_request_approved extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public function get_item_id($group)
|
||||
public static function get_item_id($group)
|
||||
{
|
||||
return (int) $group['group_id'];
|
||||
}
|
||||
@@ -42,7 +42,7 @@ class group_request_approved extends \phpbb\notification\type\base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
static public function get_item_parent_id($group)
|
||||
public static function get_item_parent_id($group)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ class pm extends \phpbb\notification\type\base
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'lang' => 'NOTIFICATION_TYPE_PM',
|
||||
);
|
||||
|
||||
@@ -69,7 +69,7 @@ class pm extends \phpbb\notification\type\base
|
||||
*
|
||||
* @param array $pm The data from the private message
|
||||
*/
|
||||
static public function get_item_id($pm)
|
||||
public static function get_item_id($pm)
|
||||
{
|
||||
return (int) $pm['msg_id'];
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class pm extends \phpbb\notification\type\base
|
||||
*
|
||||
* @param array $pm The data from the pm
|
||||
*/
|
||||
static public function get_item_parent_id($pm)
|
||||
public static function get_item_parent_id($pm)
|
||||
{
|
||||
// No parent
|
||||
return 0;
|
||||
|
@@ -50,7 +50,7 @@ class post extends \phpbb\notification\type\base
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'lang' => 'NOTIFICATION_TYPE_POST',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
);
|
||||
@@ -85,7 +85,7 @@ class post extends \phpbb\notification\type\base
|
||||
* @param array $post The data from the post
|
||||
* @return int The post id
|
||||
*/
|
||||
static public function get_item_id($post)
|
||||
public static function get_item_id($post)
|
||||
{
|
||||
return (int) $post['post_id'];
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class post extends \phpbb\notification\type\base
|
||||
* @param array $post The data from the post
|
||||
* @return int The topic id
|
||||
*/
|
||||
static public function get_item_parent_id($post)
|
||||
public static function get_item_parent_id($post)
|
||||
{
|
||||
return (int) $post['topic_id'];
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class post_in_queue extends \phpbb\notification\type\post
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'id' => 'notification.type.needs_approval',
|
||||
'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
|
||||
'group' => 'NOTIFICATION_GROUP_MODERATION',
|
||||
|
@@ -48,7 +48,7 @@ class quote extends \phpbb\notification\type\post
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'lang' => 'NOTIFICATION_TYPE_QUOTE',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
);
|
||||
|
@@ -60,7 +60,7 @@ class report_pm extends \phpbb\notification\type\pm
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = [
|
||||
public static $notification_option = [
|
||||
'id' => 'notification.type.report_pm',
|
||||
'lang' => 'NOTIFICATION_TYPE_REPORT_PM',
|
||||
'group' => 'NOTIFICATION_GROUP_MODERATION',
|
||||
@@ -72,7 +72,7 @@ class report_pm extends \phpbb\notification\type\pm
|
||||
* @param array $pm The data from the pm
|
||||
* @return int The report id
|
||||
*/
|
||||
static public function get_item_parent_id($pm)
|
||||
public static function get_item_parent_id($pm)
|
||||
{
|
||||
return (int) $pm['report_id'];
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ class report_pm_closed extends \phpbb\notification\type\pm
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = [
|
||||
public static $notification_option = [
|
||||
'id' => 'notification.type.report_pm_closed',
|
||||
'lang' => 'NOTIFICATION_TYPE_REPORT_PM_CLOSED',
|
||||
'group' => 'NOTIFICATION_GROUP_MISCELLANEOUS',
|
||||
|
@@ -66,7 +66,7 @@ class report_post extends \phpbb\notification\type\post_in_queue
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id' and 'lang')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'id' => 'notification.type.report',
|
||||
'lang' => 'NOTIFICATION_TYPE_REPORT',
|
||||
'group' => 'NOTIFICATION_GROUP_MODERATION',
|
||||
|
@@ -50,7 +50,7 @@ class report_post_closed extends \phpbb\notification\type\post
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = [
|
||||
public static $notification_option = [
|
||||
'id' => 'notification.type.report_post_closed',
|
||||
'lang' => 'NOTIFICATION_TYPE_REPORT_CLOSED',
|
||||
'group' => 'NOTIFICATION_GROUP_MISCELLANEOUS',
|
||||
|
@@ -50,7 +50,7 @@ class topic extends \phpbb\notification\type\base
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'lang' => 'NOTIFICATION_TYPE_TOPIC',
|
||||
'group' => 'NOTIFICATION_GROUP_POSTING',
|
||||
);
|
||||
@@ -85,7 +85,7 @@ class topic extends \phpbb\notification\type\base
|
||||
* @param array $post The data from the post
|
||||
* @return int The topic id
|
||||
*/
|
||||
static public function get_item_id($post)
|
||||
public static function get_item_id($post)
|
||||
{
|
||||
return (int) $post['topic_id'];
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class topic extends \phpbb\notification\type\base
|
||||
* @param array $post The data from the post
|
||||
* @return int The forum id
|
||||
*/
|
||||
static public function get_item_parent_id($post)
|
||||
public static function get_item_parent_id($post)
|
||||
{
|
||||
return (int) $post['forum_id'];
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class topic_in_queue extends \phpbb\notification\type\topic
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = array(
|
||||
public static $notification_option = array(
|
||||
'id' => 'notification.type.needs_approval',
|
||||
'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
|
||||
'group' => 'NOTIFICATION_GROUP_MODERATION',
|
||||
|
@@ -37,14 +37,14 @@ interface type_interface
|
||||
*
|
||||
* @param array $type_data The type specific data
|
||||
*/
|
||||
static public function get_item_id($type_data);
|
||||
public static function get_item_id($type_data);
|
||||
|
||||
/**
|
||||
* Get the id of the parent
|
||||
*
|
||||
* @param array $type_data The type specific data
|
||||
*/
|
||||
static public function get_item_parent_id($type_data);
|
||||
public static function get_item_parent_id($type_data);
|
||||
|
||||
/**
|
||||
* Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options)
|
||||
|
Reference in New Issue
Block a user