diff --git a/classes/event/course_module_viewed.php b/classes/event/course_module_viewed.php
index 4800141..42e0e85 100644
--- a/classes/event/course_module_viewed.php
+++ b/classes/event/course_module_viewed.php
@@ -58,8 +58,8 @@ class course_module_viewed extends \core\event\course_module_viewed {
/**
* Create instance of event.
*
- * @param $game
- * @param $context
+ * @param stdClass $game
+ * @param context_module $context
*
* @return event
*/
diff --git a/cross/cross_class.php b/cross/cross_class.php
index ae00d92..75dea5c 100644
--- a/cross/cross_class.php
+++ b/cross/cross_class.php
@@ -512,8 +512,8 @@ class Cross
/**
* Swaps two variables.
*
- * @param &$a
- * @param &$b
+ * @param object $a
+ * @param object $b
*/
public function swap( &$a, &$b) {
$temp = $a;
@@ -572,11 +572,11 @@ class Cross
* @param int $valblanc
* @param string $puzzle
* @param array $words
- * @param $magics
- * @param $poss
- * @param $ccrosspos
- * @param $crossdir
- * @param $crosssword
+ * @param object $magics
+ * @param object $poss
+ * @param int $ccrosspos
+ * @param int $crossdir
+ * @param object $crosssword
* @param int $n20
*
* @return true if it is ok.
@@ -709,9 +709,9 @@ class Cross
/**
* my_preg_match (backward compatibility).
*
- * @param $w
- * @param $words
- * @param $word
+ * @param string $w
+ * @param string $words
+ * @param string $word
*
* @return true if it is ok.
*/
@@ -744,9 +744,9 @@ class Cross
/**
* Set a char to the specified position.
*
- * @param $s
- * @param $pos
- * @param $char
+ * @param string $s
+ * @param int $pos
+ * @param string $char
*/
public function setchar( &$s, $pos, $char) {
$ret = "";
@@ -761,8 +761,8 @@ class Cross
/**
* Show html base.
*
- * @param $crossm
- * @param $crossd
+ * @param object $crossm
+ * @param object $crossd
* @param boolean $showsolution
* @param boolean $showhtmlsolutions
* @param boolean $showstudentguess
diff --git a/cross/crossdb_class.php b/cross/crossdb_class.php
index 01f6b7f..fe77e59 100644
--- a/cross/crossdb_class.php
+++ b/cross/crossdb_class.php
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
* @author bdaloukas
* @package game
**/
-
-defined('MOODLE_INTERNAL') || die();
-
class CrossDB extends Cross {
/**
* Save cross.
diff --git a/cryptex/cryptexdb_class.php b/cryptex/cryptexdb_class.php
index b24d474..6b20c53 100644
--- a/cryptex/cryptexdb_class.php
+++ b/cryptex/cryptexdb_class.php
@@ -39,7 +39,7 @@ class CryptexDB extends CrossDB {
* @param array $crossm
* @param array $crossd
* @param int $id
- * @param $letters
+ * @param string $letters
*
* @return the saved record
*/
@@ -134,12 +134,12 @@ class CryptexDB extends CrossDB {
/**
* Displays the cryptex.
*
- * @param $cols
- * @param $rows
- * @param $letters
- * @param $mask
- * @param $showsolution
- * @param $textdir
+ * @param int $cols
+ * @param int $rows
+ * @param string $letters
+ * @param string $mask
+ * @param boolean $showsolution
+ * @param boolean $textdir
*/
public function displaycryptex( $cols, $rows, $letters, $mask, $showsolution, $textdir) {
echo "
";
diff --git a/db/importsnakes.php b/db/importsnakes.php
index 3bd6cc5..6839df5 100644
--- a/db/importsnakes.php
+++ b/db/importsnakes.php
@@ -70,6 +70,8 @@ function game_importsnakes() {
/**
* Insert one board to database
+ *
+ * @param $newrec
*/
function game_importsnakes_do( $newrec) {
global $DB;
diff --git a/export/exporthtml_millionaire.php b/export/exporthtml_millionaire.php
index e72bd1e..39fa81f 100644
--- a/export/exporthtml_millionaire.php
+++ b/export/exporthtml_millionaire.php
@@ -29,11 +29,11 @@ defined('MOODLE_INTERNAL') || die();
*
* @param stdClass $game
* @param stdClass $context
- * @param $maxanswers
- * @param $countofquestions
- * @param $retfeedback
- * @param $destdir
- * @param $files
+ * @param int $maxanswers
+ * @param int $countofquestions
+ * @param string $retfeedback
+ * @param string $destdir
+ * @param array $files
*/
function game_millionaire_html_getquestions( $game, $context, &$maxanswers, &$countofquestions, &$retfeedback, $destdir, &$files) {
global $CFG, $DB, $USER;
diff --git a/hangman/play.php b/hangman/play.php
index 36fc00e..1c0b46f 100644
--- a/hangman/play.php
+++ b/hangman/play.php
@@ -27,13 +27,13 @@ defined('MOODLE_INTERNAL') || die();
/**
* Plays the game hangman
*
- * @param $id
- * @param $game
- * @param $attempt
- * @param $hangman
- * @param $newletter
- * @param $action
- * @param $context
+ * @param int $id
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $hangman
+ * @param string $newletter
+ * @param string $action
+ * @param stdClass $context
*/
function game_hangman_continue( $id, $game, $attempt, $hangman, $newletter, $action, $context) {
global $DB, $USER;
@@ -233,13 +233,13 @@ function game_hangman_onfinishgame( $game, $attempt, $hangman) {
/**
* Plays the hangman game.
*
- * @param $id
- * @param $game
- * @param $attempt
- * @param $hangman
- * @param $onlyshow
- * @param $showsolution
- * @param $context
+ * @param int $id
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $hangman
+ * @param boolean $onlyshow
+ * @param boolean $showsolution
+ * @param stdClass $context
*/
function game_hangman_play( $id, $game, $attempt, $hangman, $onlyshow, $showsolution, $context) {
global $CFG, $DB, $OUTPUT;
@@ -321,20 +321,20 @@ function game_hangman_play( $id, $game, $attempt, $hangman, $onlyshow, $showsolu
/**
* Shows page.
*
- * @param $done
- * @param $correct
- * @param $wrong
- * @param $max
- * @param wordline
- * @param $wordline2
- * @param $links
+ * @param boolean $done
+ * @param boolean $correct
+ * @param boolean $wrong
+ * @param int $max
+ * @param string wordline
+ * @param string $wordline2
+ * @param array $links
* @param stdClass $game
- * @param $attempt
- * @param $hangman
- * @param $query
- * @param $onlyshow
- * @param $showsolution
- * @param $context
+ * @param stdClass $attempt
+ * @param stdClass $hangman
+ * @param stdClass $query
+ * @param boolean $onlyshow
+ * @param boolean $showsolution
+ * @param stdClass $context
*/
function hangman_showpage(&$done, &$correct, &$wrong, $max, &$wordline, &$wordline2, &$links,
$game, &$attempt, &$hangman, &$query, $onlyshow, $showsolution, $context) {
@@ -484,12 +484,12 @@ function hangman_showpage(&$done, &$correct, &$wrong, $max, &$wordline, &$wordli
/**
* This word is correct. If reach the max number of words I have to finish else continue with next word.
*
- * @param $id
- * @param $wordline
- * @param $game
- * @param $attempt
- * @param $hangman
- * @param $query
+ * @param int $id
+ * @param string $wordline
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $hangman
+ * @param stdClass $query
*/
function hangman_oncorrect( $id, $wordline, $game, $attempt, $hangman, $query) {
global $DB;
@@ -510,14 +510,14 @@ function hangman_oncorrect( $id, $wordline, $game, $attempt, $hangman, $query) {
/**
* On incorrect.
*
- * @param $id
- * @param $wordline
- * @param $word
- * @param $game
- * @param $attempt
- * @param $hangman
- * @param $onlyshow
- * @param $showsolution
+ * @param int $id
+ * @param string $wordline
+ * @param string $word
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $hangman
+ * @param boolean $onlyshow
+ * @param boolean $showsolution
*/
function hangman_onincorrect( $id, $wordline, $word, $game, $attempt, $hangman, $onlyshow, $showsolution) {
echo "\r\n
\n$wordline\r\n";
@@ -544,10 +544,10 @@ function hangman_onincorrect( $id, $wordline, $word, $game, $attempt, $hangman,
/**
* Shows the next word.
*
- * @param $id
- * @param $game
- * @param $attempt
- * @param $hangman
+ * @param int $id
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $hangman
*/
function game_hangman_show_nextword( $id, $game, $attempt, $hangman) {
global $CFG, $DB;
diff --git a/hiddenpicture/play.php b/hiddenpicture/play.php
index 8bdf068..5e3ebc7 100644
--- a/hiddenpicture/play.php
+++ b/hiddenpicture/play.php
@@ -28,11 +28,11 @@ defined('MOODLE_INTERNAL') || die();
/**
* Plays the game "Hidden picture"
*
- * @param $id
- * @param $game
- * @param $attempt
- * @param $hiddenpicture
- * @param $context
+ * @param int $id
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $hiddenpicture
+ * @param stdClass $context
*/
function game_hiddenpicture_continue( $id, $game, $attempt, $hiddenpicture, $context) {
global $DB, $USER;
@@ -117,8 +117,8 @@ function game_hiddenpicture_continue( $id, $game, $attempt, $hiddenpicture, $con
/**
* Create the game_hiddenpicture record.
*
- * @param $game
- * @param $attempt
+ * @param stdClass $game
+ * @param stdClass $attempt
*/
function game_hiddenpicture_selectglossaryentry( $game, $attempt) {
global $CFG, $DB, $USER;
diff --git a/lib.php b/lib.php
index faeb094..9920cf3 100644
--- a/lib.php
+++ b/lib.php
@@ -55,7 +55,8 @@ define('GAME_REVIEW_GENERALFEEDBACK', 32 * 0x1041); // Show general feedback.
/**
* Given an object containing all the necessary data, will create a new instance and return the id number of the new instance.
*
- * @param object $instance An object from the form in mod.html
+ * @param object $game An object from the form in mod.html
+ *
* @return int The id of the newly inserted game record
**/
function game_add_instance($game) {
@@ -79,7 +80,7 @@ function game_add_instance($game) {
/**
* Given an object containing all the necessary data, this function will update an existing instance with new data.
*
- * @param object $instance An object from the form in mod.html
+ * @param object $game An object from the form in mod.html
* @return boolean Success/Fail
**/
function game_update_instance($game) {
@@ -237,10 +238,10 @@ function game_delete_instance($gameid) {
/**
* Return a small object with summary information about what a user has done
*
- * @param $course
- * @param $user
- * @param $mod
- * @param $game
+ * @param stdClass $course
+ * @param stdClass $user
+ * @param string $mod
+ * @param stdClass $game
*
* $return->time = the time they did it
* $return->info = a short text description
diff --git a/locallib.php b/locallib.php
index a2bb879..983a587 100644
--- a/locallib.php
+++ b/locallib.php
@@ -1992,6 +1992,13 @@ foreach ($anss as $answer) {
questiontext;
diff --git a/print.php b/print.php
index 75a83b8..1caf1d4 100644
--- a/print.php
+++ b/print.php
@@ -40,9 +40,9 @@ game_print( $game, $id, $context);
/**
* Print
*
- * @param $game
- * @param $update
- * @param $context
+ * @param stdClass $game
+ * @param boolean $update
+ * @param stdClass $context
*/
function game_print( $game, $update, $context) {
if ( $game->gamekind == 'cross') {
diff --git a/report/default.php b/report/default.php
index 8f2341c..86aa0d1 100644
--- a/report/default.php
+++ b/report/default.php
@@ -51,9 +51,9 @@ class game_default_report {
/**
* Display
*
- * @param $cm
- * @param $course
- * @param $game
+ * @param stdClass $cm
+ * @param stdClass $course
+ * @param stdClass $game
*/
public function display($cm, $course, $game) {
// This function just displays the report.
@@ -63,11 +63,11 @@ class game_default_report {
/**
* print header and tabs
*
- * @param $cm
- * @param $course
- * @param $game
- * @param $reportmode
- * @param $meta
+ * @param stdClass $cm
+ * @param stdClass $course
+ * @param stdClass $game
+ * @param string $reportmode
+ * @param string $meta
*/
public function print_header_and_tabs($cm, $course, $game, $reportmode = "overview", $meta = "") {
global $CFG;
diff --git a/translate.php b/translate.php
index d094703..7c08434 100644
--- a/translate.php
+++ b/translate.php
@@ -255,7 +255,7 @@ if ($ret != '') {
/**
* Returns the language file for lang
*
- * @param $lang
+ * @param string $lang
* @param string module
* @return the path of language file
*/
@@ -272,8 +272,8 @@ function getlangfile( $lang) {
/**
* Reads the language file
*
- * @param $lang
- * @param $header
+ * @param string $lang
+ * @param string $header
*/
function readlangfile( $lang, &$header) {
@@ -341,7 +341,7 @@ function splitlangdefinition($line, &$name, &$trans) {
* Read source code
*
* @param string $file
- * @param $strings
+ * @param string $strings
*/
function readsourcecode( $file, &$strings) {
global $CFG;
@@ -357,7 +357,7 @@ function readsourcecode( $file, &$strings) {
/**
* Parse line
*
- * @param $strings
+ * @param string $strings
* @param string $line
* @param string $filename
*/