diff --git a/mod/forum/classes/local/entities/forum.php b/mod/forum/classes/local/entities/forum.php index 4d4808b824b..53cfebdae0f 100644 --- a/mod/forum/classes/local/entities/forum.php +++ b/mod/forum/classes/local/entities/forum.php @@ -99,8 +99,8 @@ class forum { private $completionreplies; /** @var int $completionposts Completion posts */ private $completionposts; - /** @var bool $displaywordcounts Should display word counts in posts */ - private $displaywordcounts; + /** @var bool $displaywordcount Should display word counts in posts */ + private $displaywordcount; /** @var bool $lockdiscussionafter Timestamp after which discussions should be locked */ private $lockdiscussionafter; /** @var int $duedate Timestamp that represents the due date for forum posts */ diff --git a/mod/forum/classes/output/big_search_form.php b/mod/forum/classes/output/big_search_form.php index 119c9bc6394..42bfdc760f0 100644 --- a/mod/forum/classes/output/big_search_form.php +++ b/mod/forum/classes/output/big_search_form.php @@ -59,6 +59,8 @@ class big_search_form implements renderable, templatable { public $guestuser; /** @var bool Whether the include starredonly checkbox is checked. */ public $starredonly; + /** @var int forum ID. */ + public $forumid; /** * Constructor. diff --git a/mod/forum/classes/output/forum_post.php b/mod/forum/classes/output/forum_post.php index d9866cd59aa..b3862879934 100644 --- a/mod/forum/classes/output/forum_post.php +++ b/mod/forum/classes/output/forum_post.php @@ -107,6 +107,9 @@ class forum_post implements \renderable, \templatable { 'viewfullnames' => true, ); + /** @var \stdClass user record. */ + protected $userfrom; + /** * Builds a renderable forum post * diff --git a/mod/forum/classes/task/cron_task.php b/mod/forum/classes/task/cron_task.php index ade297fd42f..081da8f2b33 100644 --- a/mod/forum/classes/task/cron_task.php +++ b/mod/forum/classes/task/cron_task.php @@ -221,7 +221,7 @@ class cron_task extends \core\task\scheduled_task { global $DB; if (empty($discussionids)) { - $this->discussion = []; + $this->discussions = []; } else { $requiredfields = [ diff --git a/mod/forum/classes/task/send_user_notifications.php b/mod/forum/classes/task/send_user_notifications.php index ef7ac0fb90a..042b9bc330d 100644 --- a/mod/forum/classes/task/send_user_notifications.php +++ b/mod/forum/classes/task/send_user_notifications.php @@ -93,6 +93,11 @@ class send_user_notifications extends \core\task\adhoc_task { */ protected $inboundmanager; + /** + * @var array List of users. + */ + protected $users = []; + /** * Send out messages. * @throws \moodle_exception diff --git a/mod/forum/locallib.php b/mod/forum/locallib.php index d13042dc31a..205236830a6 100644 --- a/mod/forum/locallib.php +++ b/mod/forum/locallib.php @@ -45,6 +45,9 @@ class forum_portfolio_caller extends portfolio_module_caller_base { private $posts; private $keyedfiles; // just using multifiles isn't enough if we're exporting a full thread + /** @var context_module context instance. */ + private $modcontext; + /** * @return array */ diff --git a/mod/forum/tests/exporters_discussion_test.php b/mod/forum/tests/exporters_discussion_test.php index 6a2d294260e..68715c79c13 100644 --- a/mod/forum/tests/exporters_discussion_test.php +++ b/mod/forum/tests/exporters_discussion_test.php @@ -27,6 +27,10 @@ use mod_forum\local\exporters\discussion as discussion_exporter; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class exporters_discussion_test extends \advanced_testcase { + + /** @var \mod_forum\local\builders\exported_posts */ + private $builder; + /** * Test set up function. */ diff --git a/mod/forum/tests/mail_test.php b/mod/forum/tests/mail_test.php index 0a4db889641..d1bfe8af0c3 100644 --- a/mod/forum/tests/mail_test.php +++ b/mod/forum/tests/mail_test.php @@ -52,6 +52,9 @@ class mail_test extends \advanced_testcase { */ protected $mailsink; + /** @var \phpunit_event_sink */ + protected $eventsink; + public function setUp(): void { global $CFG; diff --git a/mod/forum/tests/maildigest_test.php b/mod/forum/tests/maildigest_test.php index 139c9a0b96f..27e026feeac 100644 --- a/mod/forum/tests/maildigest_test.php +++ b/mod/forum/tests/maildigest_test.php @@ -41,6 +41,12 @@ class maildigest_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; + /** @var \phpunit_message_sink */ + protected $messagesink; + + /** @var \phpunit_message_sink */ + protected $mailsink; + /** * Set up message and mail sinks, and set up other requirements for the * cron to be tested here.