Browse Source

phpdoc compatibility

MOODLE_20_STABLE
bdaloukas 8 years ago
parent
commit
d073e41ed8
  1. 4
      locallib.php
  2. 1
      showanswers.php
  3. 5
      snakes/createboard.php
  4. 5
      snakes/play.php
  5. 30
      sudoku/class.Sudoku.php
  6. 2
      translate.php

4
locallib.php

@ -1150,7 +1150,7 @@ function game_score_to_grade($score, $game) {
* *
* @param object $game the game instance. * @param object $game the game instance.
* @param object $attempt the attempt in question. * @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, * @return object an object with boolean fields responses, scores, feedback,
* correct_responses, solutions and general 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 object $game the game instance.
* @param array $attempts an array of attempt objects. * @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 * @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 * at least one of the attempts, the other showing which options are true

1
showanswers.php

@ -487,6 +487,7 @@ function game_showanswers_glossary( $game) {
* Show answers bookquiz * Show answers bookquiz
* *
* @param stdClass $game * @param stdClass $game
* @param stdClass $context
*/ */
function game_showanswers_bookquiz( $game, $context) { function game_showanswers_bookquiz( $game, $context) {
global $CFG; global $CFG;

5
snakes/createboard.php

@ -32,6 +32,11 @@ defined('MOODLE_INTERNAL') || die();
* @param int $colsy * @param int $colsy
* @param int $ofstop * @param int $ofstop
* @param int $ofsbottom * @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, function game_createsnakesboard($imageasstring, $colsx, $colsy, $ofstop, $ofsbottom,
$ofsright, $ofsleft, $board, $setwidth, $setheight) { $ofsright, $ofsleft, $board, $setwidth, $setheight) {

5
snakes/play.php

@ -152,7 +152,7 @@ function game_snakes_play( $id, $game, $attempt, $snakes, $context) {
/** /**
* Show dice * Show dice
* *
* @param stdClass $snake * @param stdClass $snakes
* @param boolean $board * @param boolean $board
*/ */
function game_snakes_showdice( $snakes, $board) { function game_snakes_showdice( $snakes, $board) {
@ -293,7 +293,7 @@ function game_snakes_showquestion( $id, $game, $snakes, $query, $context) {
* Shows the question. * Shows the question.
* *
* @param stdClass $game * @param stdClass $game
* @param $id * @param int $id
* @param stdClass $snakes * @param stdClass $snakes
* @param stdClass $query * @param stdClass $query
* @param stdClass $context * @param stdClass $context
@ -458,7 +458,6 @@ function game_snakes_check_glossary( $id, $game, $attempt, $snakes, $context) {
* @param stdClass $attempt * @param stdClass $attempt
* @param stdClass $snakes * @param stdClass $snakes
* @param boolean $correct * @param boolean $correct
* @param stsdClass $correct
* @param stdClasss $query * @param stdClasss $query
* @param stdClass $context * @param stdClass $context
*/ */

30
sudoku/class.Sudoku.php

@ -87,7 +87,6 @@ class objects {
* @param array * @param array
* @return boolean * @return boolean
*/ */
public function array_equal($thearray1, $thearray2) { public function array_equal($thearray1, $thearray2) {
if (!(is_array($thearray1) && is_array($thearray2))) { if (!(is_array($thearray1) && is_array($thearray2))) {
return false; return false;
@ -111,7 +110,6 @@ class objects {
* the array have been resolved into copies allowing things like the * the array have been resolved into copies allowing things like the
* board array to be copied. * board array to be copied.
*/ */
public function deepcopy($thearray = null) { public function deepcopy($thearray = null) {
if ($thearray === null) { if ($thearray === null) {
return unserialize(serialize($this)); return unserialize(serialize($this));
@ -126,7 +124,6 @@ class objects {
* @param mixed $theValue The "thing" to be pretty printed. * @param mixed $theValue The "thing" to be pretty printed.
* @param boolean $theHTMLFlag True if the output will be seen in a browser, false otherwise. * @param boolean $theHTMLFlag True if the output will be seen in a browser, false otherwise.
*/ */
public function print_d(&$thevalue, $thehtmlflag = true) { public function print_d(&$thevalue, $thehtmlflag = true) {
print SDD::dump($thevalue, $thehtmlflag); 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 * @param integer $nStates The number of states each cell can have. Looking forward to
* implementing Super-doku. * implementing Super-doku.
*/ */
public function init($inpr, $inpc, $nstates = 9) { public function init($inpr, $inpc, $nstates = 9) {
$this->r = $inpr; $this->r = $inpr;
$this->c = $inpc; $this->c = $inpc;
@ -613,6 +609,14 @@ class rcs extends ObjectS {
return $thereturn; 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) { public function un_set($thevalues) {
$thereturn = false; $thereturn = false;
@ -752,8 +756,8 @@ class r extends rcs {
/** /**
* see RCS::coupling * see RCS::coupling
* *
* @param $therow * @param int $therow
* @param $thecolumn * @param int $thecolumn
*/ */
public function coupling($therow, $thecolumn) { public function coupling($therow, $thecolumn) {
return $thestate = $this->_coupling($thecolumn); return $thestate = $this->_coupling($thecolumn);
@ -807,8 +811,10 @@ class c extends r {
/** /**
* @see R::coupling * @see R::coupling
*
* @param int $therow
* @param int $thecolumn
*/ */
public function coupling($therow, $thecolumn) { public function coupling($therow, $thecolumn) {
return $thestate = $this->_coupling($therow); return $thestate = $this->_coupling($therow);
} }
@ -829,7 +835,6 @@ class s extends rcs {
* *
* @var array * @var array
*/ */
protected $thecouplingorder = array( 1 => array(5, 6, 8, 9), protected $thecouplingorder = array( 1 => array(5, 6, 8, 9),
2 => array(4, 6, 7, 9), 2 => array(4, 6, 7, 9),
3 => array(4, 5, 7, 8), 3 => array(4, 5, 7, 8),
@ -852,6 +857,9 @@ class s extends rcs {
/** /**
* @see RCS::coupling * @see RCS::coupling
*
* @param int $therow
* @param int $thecolumn
*/ */
public function coupling($therow, $thecolumn) { public function coupling($therow, $thecolumn) {
$theindex = ((($therow - 1) % 3) * 3) + (($thecolumn - 1) % 3) + 1; $theindex = ((($therow - 1) % 3) * 3) + (($thecolumn - 1) % 3) + 1;
@ -948,7 +956,7 @@ class sudoku extends ObjectS {
/** /**
* Constructor * Constructor
* *
* @param $thedebug * @param boolean $thedebug
*/ */
public function init($thedebug = false) { public function init($thedebug = false) {
$this->thedebug = $thedebug; $this->thedebug = $thedebug;
@ -1374,8 +1382,8 @@ class sudoku extends ObjectS {
/* /*
* Get cel * Get cel
* *
* @param $r * @param int $r
* @param $c * @param int $c
*/ */
public function &getcell($r, $c) { public function &getcell($r, $c) {
return $this->theboard[$r][$c]; return $this->theboard[$r][$c];

2
translate.php

@ -476,7 +476,7 @@ function read_dir($dir, $ext) {
* @param string $en * @param string $en
* @param string $lang * @param string $lang
* @param string $strings * @param string $strings
* @param string $langfile * @param string $langname
* @param int $sum * @param int $sum
* @param string $outdir * @param string $outdir
* @param int $utranslated * @param int $utranslated

Loading…
Cancel
Save