1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 12:14:06 +02:00

[ticket/16955] Fix phpdoc annotations and return types

PHPBB3-16955
This commit is contained in:
Ruben Calvo
2022-12-31 14:58:14 +01:00
parent 60aee47f50
commit 3e8fced5c8
73 changed files with 251 additions and 205 deletions

View File

@@ -117,7 +117,7 @@ class email extends \phpbb\notification\method\messenger_base
$insert_buffer->flush();
return $this->notify_using_messenger(NOTIFY_EMAIL);
$this->notify_using_messenger(NOTIFY_EMAIL);
}
/**

View File

@@ -29,8 +29,10 @@ class admin_activate_user extends \phpbb\notification\type\base
}
/**
* {@inheritdoc}
*/
* Language key used to output the text
*
* @var string
*/
protected $language_key = 'NOTIFICATION_ADMIN_ACTIVATE_USER';
/**

View File

@@ -128,9 +128,7 @@ class approve_post extends \phpbb\notification\type\post
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -127,9 +127,7 @@ class approve_topic extends \phpbb\notification\type\topic
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -129,7 +129,7 @@ abstract class base implements \phpbb\notification\type\type_interface
*/
public function __get($name)
{
return (!isset($this->data[$name])) ? null : $this->data[$name];
return $this->data[$name] ?? null;
}
@@ -139,13 +139,24 @@ abstract class base implements \phpbb\notification\type\type_interface
* @param mixed $name
* @param mixed $value
*
* @return null
* @return void
*/
public function __set($name, $value)
{
$this->data[$name] = $value;
}
/**
* Magic method check if a variable is defined and is not null
*
* @param mixed $name
*
* @return bool
*/
public function __isset($name)
{
return isset($this->data[$name]);
}
/**
* Magic method to get a string of this notification
@@ -394,7 +405,6 @@ abstract class base implements \phpbb\notification\type\type_interface
*/
public function load_special($data, $notifications)
{
return;
}
/**
@@ -407,6 +417,14 @@ abstract class base implements \phpbb\notification\type\type_interface
return true;
}
/**
* {@inheritdoc}
*/
public function get_email_template()
{
return false;
}
/**
* Pre create insert array function (fall back)
*

View File

@@ -57,13 +57,14 @@ class bookmark extends \phpbb\notification\type\post
}
/**
* Find the users who want to receive notifications
*
* @param array $type_data Data from submit_post
* @param array $options Options for finding users for notification
*
* @return array
*/
* Find the users who want to receive notifications
*
* @param array $type_data Data from submit_post
* @param array $options Options for finding users for notification
*
* @return array
* @throws \Exception
*/
public function find_users_for_notification($type_data, $options = array())
{
$options = array_merge(array(
@@ -117,9 +118,7 @@ class bookmark extends \phpbb\notification\type\post
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -148,9 +148,7 @@ class disapprove_post extends \phpbb\notification\type\approve_post
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -148,9 +148,7 @@ class disapprove_topic extends \phpbb\notification\type\approve_topic
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -104,9 +104,7 @@ class forum extends \phpbb\notification\type\post
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -145,9 +145,7 @@ class pm extends \phpbb\notification\type\base
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -238,9 +238,7 @@ class post extends \phpbb\notification\type\base
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -152,9 +152,7 @@ class post_in_queue extends \phpbb\notification\type\post
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -149,9 +149,7 @@ class quote extends \phpbb\notification\type\post
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -125,9 +125,7 @@ class report_pm extends \phpbb\notification\type\pm
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -84,9 +84,7 @@ class report_pm_closed extends \phpbb\notification\type\pm
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -91,9 +91,7 @@ class report_post extends \phpbb\notification\type\post_in_queue
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -91,9 +91,7 @@ class report_post_closed extends \phpbb\notification\type\post
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -191,9 +191,7 @@ class topic extends \phpbb\notification\type\base
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{

View File

@@ -144,9 +144,7 @@ class topic_in_queue extends \phpbb\notification\type\topic
}
/**
* Get email template
*
* @return string|bool
* {@inheritdoc}
*/
public function get_email_template()
{