diff --git a/cross/cross_class.php b/cross/cross_class.php index faddfd6..e3b0f24 100644 --- a/cross/cross_class.php +++ b/cross/cross_class.php @@ -565,7 +565,7 @@ class Cross } /** - * Scans a positions. + * Scans a position. * * @param int $pos * @param int $dir @@ -576,7 +576,7 @@ class Cross * @param object $poss * @param int $crosspos * @param int $crossdir - * @param object $crosssword + * @param object $crossword * @param int $n20 * * @return true if it is ok. diff --git a/cryptex/play.php b/cryptex/play.php index 122ee98..789c95c 100644 --- a/cryptex/play.php +++ b/cryptex/play.php @@ -173,7 +173,7 @@ function game_cryptex_check( $id, $game, $attempt, $cryptexrec, $q, $answer, $fi * @param stdClass $game * @param stdClass $attempt * @param stdClass $cryptexrec - * @param stdClass $crosssm + * @param stdClass $crossm * @param boolean $updateattempt * @param boolean $onlyshow * @param boolean $showsolution diff --git a/hiddenpicture/play.php b/hiddenpicture/play.php index 2c9a6e4..2cb828a 100644 --- a/hiddenpicture/play.php +++ b/hiddenpicture/play.php @@ -303,6 +303,8 @@ function game_hidden_picture_computescore( $game, $hiddenpicture) { * @param stdClass $attempt * @param stdClass $hiddenpicture * @param boolean $showsolution + * @param int $offsetquestions + * @param int $correctquestions */ function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpicture, $showsolution, $offsetquestions, $correctquestions) { diff --git a/snakes/createboard.php b/snakes/createboard.php index e0b3a05..1714250 100644 --- a/snakes/createboard.php +++ b/snakes/createboard.php @@ -120,6 +120,7 @@ function computexy( $pos, &$x, &$y, $colsx, $colsy) { * Make board * * @param object $im + * @param int $dir * @param int $cs * @param int $cy * @param object $board diff --git a/sudoku/class.Sudoku.php b/sudoku/class.Sudoku.php index a69b139..6793d45 100644 --- a/sudoku/class.Sudoku.php +++ b/sudoku/class.Sudoku.php @@ -101,7 +101,7 @@ class objects { return (count($xxx) == 0); } - /* + /** * Deep copy anything. * * @param array $thearray [optional] Something to be deep copied. Default is the current @@ -117,16 +117,6 @@ class objects { return unserialize(serialize($thearray)); } } - - /** - * Debugging output interface. - * - * @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); - } } /** @@ -1816,6 +1806,12 @@ class sudoku extends ObjectS { */ class SudokuTemplates extends Sudoku { + /** + * Generate puzzle from file + * + * @param int $thehandle + * @param int $thedifficultylevel + */ public function generatepuzzlefromfile($thehandle = STDIN, $thedifficultylevel = 10) { $yyy = array(); @@ -1832,6 +1828,12 @@ class SudokuTemplates extends Sudoku return $this->generatepuzzlefromarray($yyy, $thedifficultylevel); } + /** + * Generate puzzle from file + * + * @param int $thearray + * @param int $thedifficultylevel + */ public function generatepuzzlefromarray($thearray, $thedifficultylevel = 10) { $this->_generatepuzzle($thearray, array(), array()); @@ -1857,10 +1859,19 @@ class SudokuTemplates extends Sudoku * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class sudokuintermediatesolution extends sudoku { + /** + * intermediate results + * + * @param int $thedebug + */ public function sudokuintermediateresults($thedebug = false) { $this->sudoku($thedebug); } - + /** + * print intermediate solution + * + * @param object $theheader + */ protected function _printintermediatesolution($theheader = null) { $this->printsolution($theheader); } diff --git a/sudoku/create.php b/sudoku/create.php index e29203a..fb3ffdc 100644 --- a/sudoku/create.php +++ b/sudoku/create.php @@ -129,9 +129,9 @@ function packsudoku( $si, $sp) { /** * Creates a sudoku * - * @param $id - * @param $sp - * @param $level + * @param int $id + * @param object $sp + * @param int $level * * @return true if created correctly */ @@ -157,7 +157,7 @@ function create( &$si, &$sp, $level=1) { /** * get opened * - * @param $si + * @param stdClass $si * * @return count of opened */ diff --git a/sudoku/play.php b/sudoku/play.php index a8de7e6..8cc3ee0 100644 --- a/sudoku/play.php +++ b/sudoku/play.php @@ -423,6 +423,10 @@ function game_sudoku_getglossaryentries( $game, $offsetentries, &$entrylist, $nu * @param stdClass $sudoku * @param int $offsetquestions * @param string $numbers + * @param int $correctquestions + * @param boolean $onlyshow + * @param boolean $showsolution + * @param stdClass $context */ function game_sudoku_showquestions_quiz( $id, $game, $attempt, $sudoku, $offsetquestions, $numbers, $correctquestions, $onlyshow, $showsolution, $context) { @@ -502,6 +506,9 @@ function game_sudoku_showquestions_quiz( $id, $game, $attempt, $sudoku, $offsetq * @param stdClass $sudoku * @param int $offsetentries * @param int $numbers + * @param int $correctentries + * @param boolean $onlyshow + * @param boolean $showsolution */ function game_sudoku_showquestions_glossary( $id, $game, $attempt, $sudoku, $offsetentries, $numbers, $correctentries, $onlyshow, $showsolution) { @@ -714,12 +721,12 @@ function game_sudoku_check_glossaryentries( $id, $game, $attempt, $sudoku, $fini /** * This is the last function after submiting the answers. * - * @param $id - * @param $game - * @param $attempt - * @param $sudoku - * @param $finishattempt - * @param $course + * @param int $id + * @param stdClass $game + * @param stdClass $attempt + * @param stdClass $sudoku + * @param boolean $finishattempt + * @param stdClass $course */ function game_sudoku_check_last( $id, $game, $attempt, $sudoku, $finishattempt, $course) { global $CFG, $DB; diff --git a/sudoku/sdd/class.SDD.php b/sudoku/sdd/class.SDD.php index 0cb6a6f..9a6c6d4 100644 --- a/sudoku/sdd/class.SDD.php +++ b/sudoku/sdd/class.SDD.php @@ -15,27 +15,26 @@ // along with Moodle. If not, see . /** - * Dump structured data, i.e., Objects and Arrays, in either plain text or - * html. This is a class wrapper for a couple of utility routines that I use + * Dump structured data, i.e., Objects and Arrays, in either plain text or html. + * + * This is a class wrapper for a couple of utility routines that I use * all the time. It's handier to have them as a class. * - * @author Dick Munroe + * @author Dick Munroe original package StructuredDataDumper * @copyright copyright @ by Dick Munroe, 2004 * @license http://opensource.org/licenses/gpl-license.php GNU Public License - * @package StructuredDataDumper + * @package mod_game */ defined('MOODLE_INTERNAL') || die(); /** - * Dump structured data, i.e., Objects and Arrays, in either plain text or - * html. This is a class wrapper for a couple of utility routines that I use - * all the time. It's handier to have them as a class. + * This is a class wrapper for a couple of utility routines that I use all the time. * * @author Dick Munroe * @copyright copyright @ by Dick Munroe, 2004 * @license http://opensource.org/licenses/gpl-license.php GNU Public License - * @package StructuredDataDumper + * @package mod_game */ class sdd { /** @var HTML to be generated flag. */ @@ -44,7 +43,7 @@ class sdd { /** * Constructor. * - * @param boolean $theHTMLFlag [optional] True if HTML is to be generated. + * @param boolean $thehtmlflag [optional] True if HTML is to be generated. * If omitted, $_SERVER is used to "guess" the state of * the HTML flag. Be default, HTML is generated when * accessed by a web server. @@ -60,7 +59,6 @@ class sdd { /** * Dump a structured variable. * - * @static * @param mixed $thevariable the variable to be dumped. * @param boolean $thehtmlflag [optional] true if HTML is to be generated, * false if plain text is to be generated, null (default) if @@ -95,9 +93,9 @@ class sdd { * Dump the contents of an array. * * @param array $thearray the array whose contents are to be displayed. - * @param boolean $theHTMLFlag True if an HTML table is to be generated, + * @param boolean $thehtmlflag True if an HTML table is to be generated, * false otherwise. - * @param string $theIndent [optional] Used by SDD::dArray during recursion + * @param string $theindent [optional] Used by SDD::dArray during recursion * to get indenting right. * @return string The display form of the array. */ @@ -147,8 +145,8 @@ class sdd { * the object is displayed from most derived to the base * class, in order. * - * @param object $theObject the object to be dumped. - * @param boolean $theHTMLFlag true if HTML is to be generated. + * @param object $theobject the object to be dumped. + * @param boolean $thehtmlflag true if HTML is to be generated. * @return string the display form of the object. */ public function dobject(&$theobject, $thehtmlflag) { @@ -259,8 +257,8 @@ class sdd { /** * Generate context specific new line equivalents. * - * @param integer [optional] the number of newlines. - * @param boolean [optional] true if generating html newlines. + * @param integer $thecount [optional] the number of newlines. + * @param boolean $thehtmlflag [optional] true if generating html newlines. * * @return string newlines. */ @@ -287,8 +285,8 @@ class sdd { /** * Dump any scalar value * - * @param mixed $theVariable the variable to be dumped. - * @param boolean $theHtmlFlag true if html is to be generated. + * @param mixed $thevariable the variable to be dumped. + * @param boolean $thehtmlflag true if html is to be generated. */ public function scalar(&$thevariable, $thehtmlflag) { if ($thehtmlflag) {