From d073e41ed81a20bedf11f4ed68a52cc84620ba49 Mon Sep 17 00:00:00 2001 From: bdaloukas Date: Sun, 18 Jun 2017 20:15:32 +0300 Subject: [PATCH] phpdoc compatibility --- locallib.php | 4 ++-- showanswers.php | 1 + snakes/createboard.php | 5 +++++ snakes/play.php | 5 ++--- sudoku/class.Sudoku.php | 30 +++++++++++++++++++----------- translate.php | 2 +- 6 files changed, 30 insertions(+), 17 deletions(-) diff --git a/locallib.php b/locallib.php index 684eda3..0c0ca52 100644 --- a/locallib.php +++ b/locallib.php @@ -1150,7 +1150,7 @@ function game_score_to_grade($score, $game) { * * @param object $game the game instance. * @param object $attempt the attempt in question. - * @param $context the roles and permissions context, for game module instance + * @param object $context the roles and permissions context, for game module instance * * @return object an object with boolean fields responses, scores, feedback, * correct_responses, solutions and general feedback @@ -1228,7 +1228,7 @@ function game_compute_attempt_layout( $game, &$attempt) { * * @param object $game the game instance. * @param array $attempts an array of attempt objects. - * @param $context the roles and permissions context, the game instance + * @param object $context the roles and permissions context, the game instance * * @return array of two options objects, one showing which options are true for * at least one of the attempts, the other showing which options are true diff --git a/showanswers.php b/showanswers.php index 581885a..1a12ad7 100644 --- a/showanswers.php +++ b/showanswers.php @@ -487,6 +487,7 @@ function game_showanswers_glossary( $game) { * Show answers bookquiz * * @param stdClass $game + * @param stdClass $context */ function game_showanswers_bookquiz( $game, $context) { global $CFG; diff --git a/snakes/createboard.php b/snakes/createboard.php index a8d0079..3bd53f4 100644 --- a/snakes/createboard.php +++ b/snakes/createboard.php @@ -32,6 +32,11 @@ defined('MOODLE_INTERNAL') || die(); * @param int $colsy * @param int $ofstop * @param int $ofsbottom + * @param int $ofsright + * @param int $ofsleft + * @param stdClass $board + * @param int $setwidth + * @param int $setheight */ function game_createsnakesboard($imageasstring, $colsx, $colsy, $ofstop, $ofsbottom, $ofsright, $ofsleft, $board, $setwidth, $setheight) { diff --git a/snakes/play.php b/snakes/play.php index 06f1d6a..077f69e 100644 --- a/snakes/play.php +++ b/snakes/play.php @@ -152,7 +152,7 @@ function game_snakes_play( $id, $game, $attempt, $snakes, $context) { /** * Show dice * - * @param stdClass $snake + * @param stdClass $snakes * @param boolean $board */ function game_snakes_showdice( $snakes, $board) { @@ -293,7 +293,7 @@ function game_snakes_showquestion( $id, $game, $snakes, $query, $context) { * Shows the question. * * @param stdClass $game - * @param $id + * @param int $id * @param stdClass $snakes * @param stdClass $query * @param stdClass $context @@ -458,7 +458,6 @@ function game_snakes_check_glossary( $id, $game, $attempt, $snakes, $context) { * @param stdClass $attempt * @param stdClass $snakes * @param boolean $correct - * @param stsdClass $correct * @param stdClasss $query * @param stdClass $context */ diff --git a/sudoku/class.Sudoku.php b/sudoku/class.Sudoku.php index acb7608..683bce1 100644 --- a/sudoku/class.Sudoku.php +++ b/sudoku/class.Sudoku.php @@ -87,7 +87,6 @@ class objects { * @param array * @return boolean */ - public function array_equal($thearray1, $thearray2) { if (!(is_array($thearray1) && is_array($thearray2))) { return false; @@ -111,7 +110,6 @@ class objects { * the array have been resolved into copies allowing things like the * board array to be copied. */ - public function deepcopy($thearray = null) { if ($thearray === null) { return unserialize(serialize($this)); @@ -126,7 +124,6 @@ class objects { * @param mixed $theValue The "thing" to be pretty printed. * @param boolean $theHTMLFlag True if the output will be seen in a browser, false otherwise. */ - public function print_d(&$thevalue, $thehtmlflag = true) { print SDD::dump($thevalue, $thehtmlflag); } @@ -162,7 +159,6 @@ class cell extends objects { * @param integer $nStates The number of states each cell can have. Looking forward to * implementing Super-doku. */ - public function init($inpr, $inpc, $nstates = 9) { $this->r = $inpr; $this->c = $inpc; @@ -613,6 +609,14 @@ class rcs extends ObjectS { return $thereturn; } + + /** + * un set + * + * @param $thevalues + * + * @return boolean True if one or more values in the RCS has changed state. + */ public function un_set($thevalues) { $thereturn = false; @@ -752,8 +756,8 @@ class r extends rcs { /** * see RCS::coupling * - * @param $therow - * @param $thecolumn + * @param int $therow + * @param int $thecolumn */ public function coupling($therow, $thecolumn) { return $thestate = $this->_coupling($thecolumn); @@ -807,8 +811,10 @@ class c extends r { /** * @see R::coupling + * + * @param int $therow + * @param int $thecolumn */ - public function coupling($therow, $thecolumn) { return $thestate = $this->_coupling($therow); } @@ -829,7 +835,6 @@ class s extends rcs { * * @var array */ - protected $thecouplingorder = array( 1 => array(5, 6, 8, 9), 2 => array(4, 6, 7, 9), 3 => array(4, 5, 7, 8), @@ -852,6 +857,9 @@ class s extends rcs { /** * @see RCS::coupling + * + * @param int $therow + * @param int $thecolumn */ public function coupling($therow, $thecolumn) { $theindex = ((($therow - 1) % 3) * 3) + (($thecolumn - 1) % 3) + 1; @@ -948,7 +956,7 @@ class sudoku extends ObjectS { /** * Constructor * - * @param $thedebug + * @param boolean $thedebug */ public function init($thedebug = false) { $this->thedebug = $thedebug; @@ -1374,8 +1382,8 @@ class sudoku extends ObjectS { /* * Get cel * - * @param $r - * @param $c + * @param int $r + * @param int $c */ public function &getcell($r, $c) { return $this->theboard[$r][$c]; diff --git a/translate.php b/translate.php index d2f17d6..9e36f17 100644 --- a/translate.php +++ b/translate.php @@ -476,7 +476,7 @@ function read_dir($dir, $ext) { * @param string $en * @param string $lang * @param string $strings - * @param string $langfile + * @param string $langname * @param int $sum * @param string $outdir * @param int $utranslated