diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/cron/task/base.php | 6 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/prune_all_forums.php | 4 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/prune_forum.php | 13 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/queue.php | 8 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_cache.php | 6 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_database.php | 4 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_search.php | 6 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_sessions.php | 4 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_warnings.php | 6 | ||||
-rw-r--r-- | phpBB/includes/cron/task/parametrized.php | 4 | ||||
-rw-r--r-- | phpBB/includes/cron/task/task.php | 8 | ||||
-rw-r--r-- | phpBB/includes/cron/task/wrapper.php | 12 |
12 files changed, 80 insertions, 1 deletions
diff --git a/phpBB/includes/cron/task/base.php b/phpBB/includes/cron/task/base.php index dff98175fb..a4e89f137f 100644 --- a/phpBB/includes/cron/task/base.php +++ b/phpBB/includes/cron/task/base.php @@ -33,6 +33,8 @@ abstract class phpbb_cron_task_base implements phpbb_cron_task * * For example, a cron task that prunes forums can only run when * forum pruning is enabled. + * + * @return bool */ public function is_runnable() { @@ -42,6 +44,8 @@ abstract class phpbb_cron_task_base implements phpbb_cron_task /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { @@ -50,6 +54,8 @@ abstract class phpbb_cron_task_base implements phpbb_cron_task /** * Returns whether this cron task can be run in shutdown function. + * + * @return bool */ public function is_shutdown_function_safe() { diff --git a/phpBB/includes/cron/task/core/prune_all_forums.php b/phpBB/includes/cron/task/core/prune_all_forums.php index 2e6f2444d3..69ae7f63cd 100644 --- a/phpBB/includes/cron/task/core/prune_all_forums.php +++ b/phpBB/includes/cron/task/core/prune_all_forums.php @@ -28,6 +28,8 @@ class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base { /** * Runs this cron task. + * + * @return void */ public function run() { @@ -60,6 +62,8 @@ class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base /** * Returns whether this cron task can run, given current board configuration. + * + * @return bool */ public function is_runnable() { diff --git a/phpBB/includes/cron/task/core/prune_forum.php b/phpBB/includes/cron/task/core/prune_forum.php index 6393281d32..18db44cf2d 100644 --- a/phpBB/includes/cron/task/core/prune_forum.php +++ b/phpBB/includes/cron/task/core/prune_forum.php @@ -37,6 +37,8 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p * If $forum_data is not given, forum id will be retrieved via request_var * and a database query will be performed to load the necessary information * about the forum. + * + * @return void */ public function __construct($forum_data = null) { @@ -53,6 +55,8 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p /** * Runs this cron task. + * + * @return void */ public function run() { @@ -75,6 +79,8 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p /** * Returns whether this cron task can run, given current board configuration. + * + * @return bool */ public function is_runnable() { @@ -85,6 +91,8 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { @@ -93,8 +101,9 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p /** * Returns parameters of this cron task as an array. - * * The array has one key, f, whose value is id of the forum to be pruned. + * + * @return array */ public function get_parameters() { @@ -106,6 +115,8 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p * phpbb_request_interface. * * It is expected to have a key f whose value is id of the forum to be pruned. + * + * @return void */ public function parse_parameters(phpbb_request_interface $request) { diff --git a/phpBB/includes/cron/task/core/queue.php b/phpBB/includes/cron/task/core/queue.php index 852a8d97f4..ccea4b85bd 100644 --- a/phpBB/includes/cron/task/core/queue.php +++ b/phpBB/includes/cron/task/core/queue.php @@ -24,6 +24,8 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base { /** * Runs this cron task. + * + * @return void */ public function run() { @@ -38,6 +40,8 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base /** * Returns whether this cron task can run, given current board configuration. + * + * @return bool */ public function is_runnable() { @@ -48,6 +52,8 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { @@ -57,6 +63,8 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base /** * Returns whether this cron task can be run in shutdown function. + * + * @return bool */ public function is_shutdown_function_safe() { diff --git a/phpBB/includes/cron/task/core/tidy_cache.php b/phpBB/includes/cron/task/core/tidy_cache.php index 8a91f68a48..83a60d8760 100644 --- a/phpBB/includes/cron/task/core/tidy_cache.php +++ b/phpBB/includes/cron/task/core/tidy_cache.php @@ -24,6 +24,8 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base { /** * Runs this cron task. + * + * @return void */ public function run() { @@ -33,6 +35,8 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base /** * Returns whether this cron task can run, given current board configuration. + * + * @return bool */ public function is_runnable() { @@ -43,6 +47,8 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { diff --git a/phpBB/includes/cron/task/core/tidy_database.php b/phpBB/includes/cron/task/core/tidy_database.php index 847b882c7d..82a0a4583e 100644 --- a/phpBB/includes/cron/task/core/tidy_database.php +++ b/phpBB/includes/cron/task/core/tidy_database.php @@ -24,6 +24,8 @@ class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base { /** * Runs this cron task. + * + * @return void */ public function run() { @@ -38,6 +40,8 @@ class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { diff --git a/phpBB/includes/cron/task/core/tidy_search.php b/phpBB/includes/cron/task/core/tidy_search.php index 735dc14b68..a781005960 100644 --- a/phpBB/includes/cron/task/core/tidy_search.php +++ b/phpBB/includes/cron/task/core/tidy_search.php @@ -26,6 +26,8 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base { /** * Runs this cron task. + * + * @return void */ public function run() { @@ -51,6 +53,8 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base /** * Returns whether this cron task can run, given current board configuration. + * + * @return bool */ public function is_runnable() { @@ -65,6 +69,8 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { diff --git a/phpBB/includes/cron/task/core/tidy_sessions.php b/phpBB/includes/cron/task/core/tidy_sessions.php index dc398fa5e4..5826584691 100644 --- a/phpBB/includes/cron/task/core/tidy_sessions.php +++ b/phpBB/includes/cron/task/core/tidy_sessions.php @@ -24,6 +24,8 @@ class phpbb_cron_task_core_tidy_sessions extends phpbb_cron_task_base { /** * Runs this cron task. + * + * @return void */ public function run() { @@ -34,6 +36,8 @@ class phpbb_cron_task_core_tidy_sessions extends phpbb_cron_task_base /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { diff --git a/phpBB/includes/cron/task/core/tidy_warnings.php b/phpBB/includes/cron/task/core/tidy_warnings.php index c3826dc687..3b0cf57f0c 100644 --- a/phpBB/includes/cron/task/core/tidy_warnings.php +++ b/phpBB/includes/cron/task/core/tidy_warnings.php @@ -26,6 +26,8 @@ class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base { /** * Runs this cron task. + * + * @return void */ public function run() { @@ -39,6 +41,8 @@ class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base /** * Returns whether this cron task can run, given current board configuration. + * + * @return bool */ public function is_runnable() { @@ -49,6 +53,8 @@ class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run() { diff --git a/phpBB/includes/cron/task/parametrized.php b/phpBB/includes/cron/task/parametrized.php index b839904642..6f87e1c818 100644 --- a/phpBB/includes/cron/task/parametrized.php +++ b/phpBB/includes/cron/task/parametrized.php @@ -32,6 +32,8 @@ interface phpbb_cron_task_parametrized extends phpbb_cron_task * Returns parameters of this cron task as an array. * * The array must map string keys to string values. + * + * @return array */ public function get_parameters(); @@ -41,6 +43,8 @@ interface phpbb_cron_task_parametrized extends phpbb_cron_task * * $request contains user input and must not be trusted. * Cron task must validate all data before using it. + * + * @return void */ public function parse_parameters(phpbb_request_interface $request); }
\ No newline at end of file diff --git a/phpBB/includes/cron/task/task.php b/phpBB/includes/cron/task/task.php index 050e85c35e..72fda91dd0 100644 --- a/phpBB/includes/cron/task/task.php +++ b/phpBB/includes/cron/task/task.php @@ -23,6 +23,8 @@ interface phpbb_cron_task { /** * Runs this cron task. + * + * @return void */ public function run(); @@ -31,17 +33,23 @@ interface phpbb_cron_task * * For example, a cron task that prunes forums can only run when * forum pruning is enabled. + * + * @return bool */ public function is_runnable(); /** * Returns whether this cron task should run now, because enough time * has passed since it was last run. + * + * @return bool */ public function should_run(); /** * Returns whether this cron task can be run in shutdown function. + * + * @return bool */ public function is_shutdown_function_safe(); } diff --git a/phpBB/includes/cron/task/wrapper.php b/phpBB/includes/cron/task/wrapper.php index c2e7e42830..23cd4de724 100644 --- a/phpBB/includes/cron/task/wrapper.php +++ b/phpBB/includes/cron/task/wrapper.php @@ -25,6 +25,8 @@ class phpbb_cron_task_wrapper { /** * Wraps a task $task, which must implement cron_task interface. + * + * @return void */ public function __construct(phpbb_cron_task $task) { @@ -36,6 +38,8 @@ class phpbb_cron_task_wrapper * * Parametrized tasks accept parameters during initialization and must * normally be scheduled with parameters. + * + * @return bool Whether or not this task is parametrized. */ public function is_parametrized() { @@ -47,6 +51,8 @@ class phpbb_cron_task_wrapper * * A task is ready to run when it is runnable according to current configuration * and enough time has passed since it was last run. + * + * @return bool Whether the wrapped task is ready to run. */ public function is_ready() { @@ -55,6 +61,8 @@ class phpbb_cron_task_wrapper /** * Returns the name of wrapped task. It is the same as the wrapped class's class name. + * + * @return string Class name of wrapped task. */ public function get_name() { @@ -63,6 +71,8 @@ class phpbb_cron_task_wrapper /** * Returns a url through which this task may be invoked via web. + * + * @return string URL */ public function get_url() { @@ -88,6 +98,8 @@ class phpbb_cron_task_wrapper /** * Forwards all other method calls to the wrapped task implementation. + * + * @return mixed */ public function __call($name, $args) { |