fix many docstrings and their formatting

This commit is contained in:
oliver 2016-05-28 12:30:53 +02:00
parent e50c2bb5e6
commit 7085de8fe2
36 changed files with 679 additions and 659 deletions

View file

@ -200,11 +200,11 @@
* Save the answer of a Character group for a Station.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $group Current Character data
* @param array $answers Character answers for the Quest
* @param array $charactergroup Current Character group data
* @param array $answer Character group answer for the Station
*/
public function saveAnswer($seminary, $groupsgroup, $quest, $station, $group, $answer)
{
@ -224,11 +224,11 @@
* correct one.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $group Current Character group data
* @param array $answers Character answers for the Quest
* @param array $charactergroup Current Character group data
* @param array $answer Character group answer for the Station
*/
public function matchAnswer($seminary, $groupsgroup, $quest, $station, $group, $answer)
{

View file

@ -996,7 +996,7 @@
*
* @param string $stationtypeClassname Name of the class for the Stationtype of a Station
* @param array $seminary Seminary data
* @param array $questgroup Questgroup data
* @param array $groupsgroup Groups-group data
* @param array $quest Quest data
* @param array $station Station data
* @param array $charactergroup Charactergroup data
@ -1164,7 +1164,7 @@
* Create a response for the Stationtype rendering.
*
* @param string $action Action to run
* @param mixed $param Additional parameters to add to the response
* @param mixed $param1 Additional parameters to add to the response
* @return \nre\core\Response Generated response
*/
private function createStationtypeResponse($action, $param1)

View file

@ -111,7 +111,7 @@
* Show a Questtopic and its Quests with Questsubtopics.
*
* @throws \nre\exceptions\IdNotFoundException
* @param string $eminaryUrl URL-Title of Seminary
* @param string $seminaryUrl URL-Title of Seminary
* @param string $questtopicUrl URL-Title of Questtopic
*/
public function topic($seminaryUrl, $questtopicUrl)
@ -159,7 +159,7 @@
* Manage a Questtopic and its Quests with Questsubtopics.
*
* @throws \nre\exceptions\IdNotFoundException
* @param string $eminaryUrl URL-Title of Seminary
* @param string $seminaryUrl URL-Title of Seminary
* @param string $questtopicUrl URL-Title of Questtopic
*/
public function manage($seminaryUrl, $questtopicUrl)
@ -296,7 +296,7 @@
* Edit a Questtopic of a Seminary and its Questsubtopics.
*
* @throws \nre\exceptions\IdNotFoundException
* @param string $eminaryUrl URL-Title of Seminary
* @param string $seminaryUrl URL-Title of Seminary
* @param string $questtopicUrl URL-Title of Questtopic
*/
public function edit($seminaryUrl, $questtopicUrl)
@ -472,7 +472,7 @@
* Delete a Questtopic of a Seminary.
*
* @throws \nre\exceptions\IdNotFoundException
* @param string $eminaryUrl URL-Title of Seminary
* @param string $seminaryUrl URL-Title of Seminary
* @param string $questtopicUrl URL-Title of Questtopic
*/
public function delete($seminaryUrl, $questtopicUrl)

View file

@ -45,7 +45,7 @@
* Generate a mail message to notify of a new user registration.
*
* @param array $receiver User that the message will be send to
* @param array $neUser Newly registered user
* @param array $newUser Newly registered user
*/
public function userregistration($receiver, $newUser)
{

View file

@ -27,7 +27,7 @@
/**
* Action: index.
*
* @param $array $user User receiving mail
* @param array $user User receiving mail
*/
public function index($user)
{

View file

@ -301,7 +301,7 @@
* @throws \nre\exceptions\IdNotFoundException
* @param string $seminaryUrl URL-title of the Seminary
* @param string $achievementUrl URL-title of the Achievement
* @param string $action Action for processing the media
* @param string $locked Whether to display the locked version or not
*/
public function achievement($seminaryUrl, $achievementUrl, $locked=null)
{
@ -530,7 +530,7 @@
* @param string $seminaryUrl URL-title of Seminary
* @param string $groupsgroupUrl URL-title of Character groups-group
* @param string $achievementUrl URL-title of the Achievement
* @param string $action Action for processing the media
* @param string $locked Whether to show the locked version or not
*/
public function charactergroupsachievement($seminaryUrl, $groupsgroupUrl, $achievementUrl, $locked=null)
{

View file

@ -47,6 +47,7 @@
* Show moodpic of a Seminary.
*
* @param string $seminaryUrl URL of Seminary to show moodpic of
* @param string $agentName Name of Agent to show moodpic for
*/
public function seminary($seminaryUrl, $agentName=null)
{
@ -86,7 +87,7 @@
* Show moodpic of a Questgroup.
*
* @param string $seminaryUrl URL of Seminary
* @param string $quesgroupUrl URL of Questgroup to show moodpic of
* @param string $questgroupUrl URL of Questgroup to show moodpic of
*/
public function questgroup($seminaryUrl, $questgroupUrl)
{

View file

@ -53,8 +53,8 @@
*
* @throws \nre\exceptions\IdNotFoundException
* @param string $seminaryUrl URL-Title of a Seminary
* @param string $groupsgroupUrl URL-Title of a Character groups-group
* @param string $achievementUrl URL of Achievement
* @param int $size QR-code size
*/
public function achievement($seminaryUrl, $achievementUrl, $size=1)
{
@ -129,6 +129,7 @@
* @param string $groupsgroupUrl URL-Title of a Character groups-group
* @param string $questUrl URL-Title of a Character groups Quest
* @param string $stationUrl URL of Character groups Quest station
* @param int $size QR-code size
*/
public function charactergroupsqueststation($seminaryUrl, $groupsgroupUrl, $questUrl, $stationUrl, $size=1)
{
@ -166,6 +167,7 @@
* @param string $seminaryUrl URL-Title of a Seminary
* @param string $groupsgroupUrl URL-Title of a Character groups-group
* @param string $achievementUrl URL of Achievement
* @param int $size QR-code size
*/
public function charactergroupsachievements($seminaryUrl, $groupsgroupUrl, $achievementUrl, $size=1)
{
@ -233,6 +235,13 @@
}
/**
* Generate QR-code with given text and in given size.
*
* @param string $text QR-code content
* @param int $size QR-code size
* @return mixed Null
*/
private function generateQRcode($text, $size)
{
\hhu\z\lib\Phpqrcode::load();

View file

@ -1357,7 +1357,7 @@
* Create a response for the Questtype rendering.
*
* @param string $action Action to run
* @param mixed $param Additional parameters to add to the response
* @param mixed $param1 Additional parameters to add to the response
* @return \nre\core\Response Generated response
*/
private function createQuesttypeResponse($action, $param1)

View file

@ -155,7 +155,7 @@
*
* @param mixed $validation Validation array to add result to
* @param string $index Name of parameter of the custom validation result
* @param mixed $result Validation result
* @param mixed $results Validation result
* @return mixed The altered validation array
*/
public function addValidationResults($validation, $index, $results)

View file

@ -270,7 +270,7 @@
* Get the rank for the number of achieved Achievements.
*
* @param int $seminaryId ID of Seminary
* @param int $xps Amount of achieved Achievements
* @param int $count Amount of achieved Achievements
* @return int Rank of Achievements count
*/
public function getCountRank($seminaryId, $count)
@ -1186,7 +1186,7 @@
*
* @param int $seminaryId ID of Seminary
* @param string $title Achievement title to check
* @param int $characterId Do not check this ID (for editing)
* @param int $achievementId Do not check this ID (for editing)
* @return boolean Whether Achievement title exists or not
*/
public function achievementTitleExists($seminaryId, $title, $achievementId=null)

View file

@ -351,7 +351,7 @@
* Get a Character group by its ID.
*
* @throws \nre\exceptions\IdNotFoundException
* @param int $groupsgroupId ID of the Character group
* @param int $groupId ID of the Character group
* @return array Character group data
*/
public function getGroupById($groupId)
@ -544,7 +544,7 @@
/**
* Get the rank of a XP-value of a Character.
*
* @param int $seminaryId ID of Seminary
* @param int $groupsgroupId ID of Seminary
* @param int $xps XP-value to get rank for
* @return int Rank of XP-value
*/

View file

@ -359,10 +359,8 @@
* Copy all Achievements of a Seminary.
*
* @param int $userId ID of creating user
* @param int $sourceSeminaryId Seminary to copy from
* @param int $targetSeminaryId Seminary to copy to
* @param array $characterGroupsgroupIds Mapping of Character groups-group IDs from source Seminary to target Seminary
* @param array $seminaryMediaIds Mapping of Seminarymedia-IDs from source Seminary to target Seminary
* @param array $questIds Mapping of Quest-IDs from source Seminary to target Seminary (optional)
*/
public function copyAchievementsOfSeminary($userId, $characterGroupsgroupIds, $seminaryMediaIds=null)
{

View file

@ -214,7 +214,7 @@
* Check if a Character groups Quest title already exists.
*
* @param int $groupsgroupId ID of Character groups-group
* @param string $name Character groups Quest title to check
* @param string $title Character groups Quest title to check
* @param int $questId Do not check this ID (for editing)
* @return boolean Whether Character groups Quest title exists or not
*/

View file

@ -116,7 +116,7 @@
* Get a Station by its Hash.
*
* @throws \nre\exceptions\IdNotFoundException
* @param string $stationUrl Hash of Station to get
* @param string $stationHash Hash of Station to get
* @return array Station data
*/
public function getStationByHash($stationHash)
@ -332,7 +332,7 @@
/**
* Check if a Character group has solved a Station.
*
* @param int $questId ID of Quest to check
* @param int $stationId ID of Quest to check
* @param int $groupId ID of Character to check
* @result boolean Whether Character has solved the Quest or not
*/

View file

@ -37,7 +37,7 @@
/**
* Get all characterroles for a Character referenced by its ID.
*
* @param int $userId ID of an user
* @param int $characterId ID of Character
* @return array Characterroles for a Character
*/
public function getCharacterrolesForCharacterById($characterId)

View file

@ -358,7 +358,7 @@
* Get Characters with the most amount of Achievements.
*
* @param int $seminaryId ID of Seminary
* @param int $conut Amount of Characters to retrieve
* @param int $count Amount of Characters to retrieve
* @param bool $alsoWithDeadline Include Achievements with deadline (optional)
* @return array List of Characters
*/

View file

@ -57,7 +57,7 @@
* Get Character type by its URL.
*
* @param int $seminaryId ID of Seminary
* @param string $charactretypeUrl URL-title of Character type
* @param string $charactertypeUrl URL-title of Character type
* @return array Character type data
*/
public function getCharactertypeByUrl($seminaryId, $charactertypeUrl)

View file

@ -38,7 +38,7 @@
* Get a medium by its URL.
*
* @throws \nre\exceptions\IdNotFoundException
* @param string $mediaURL URL-name of the Medium
* @param string $mediaUrl URL-name of the Medium
* @return array Medium data
*/
public function getMediaByUrl($mediaUrl)
@ -115,7 +115,7 @@
* Get a Seminary medium by its ID.
*
* @throws \nre\exceptions\IdNotFoundException
* @param int $seminaryMediaId ID of the Seminary medium
* @param int $mediaId ID of the Seminary medium
* @return array Seminary medium data
*/
public function getSeminaryMediaById($mediaId)
@ -326,7 +326,7 @@
* Copy an Avatar picture.
*
* @param int $userId ID of creating user
* @param int $seminaryMediaId ID of Seminary media to copy
* @param int $avatarpictureId ID of Avatar picture
*/
public function copyAvatarpicture($userId, $avatarpictureId)
{
@ -403,7 +403,7 @@
* Copy a Questgroup picture.
*
* @param int $userId ID of creating user
* @param int $seminaryMediaId ID of Seminary media to copy
* @param int $questgroupspictureId ID of Questgroup picture
*/
public function copyQuestgroupspicture($userId, $questgroupspictureId)
{

View file

@ -68,7 +68,7 @@
/**
* Get a page by its ID.
*
* @param string $pageid ID of page to get
* @param string $pageId ID of page to get
* @return array Page data
*/
public function getPageById($pageId)
@ -216,10 +216,10 @@
/*
/**
* Mask parameters to be used in an URL.
*
* @param string $param1 First parameter
* @param string $param First parameter
* @return string Masked parameters as string
*/
private static function createLinkParam($param)

View file

@ -138,7 +138,7 @@
*
* @throws \nre\exceptions\IdNotFoundException
* @param int $seminaryId ID of the corresponding seminary
* @param string $questgroupURL URL-title of a Questgroup
* @param string $questgroupUrl URL-title of a Questgroup
* @return array Questgroup data
*/
public function getQuestgroupByUrl($seminaryId, $questgroupUrl)
@ -221,7 +221,7 @@
/**
* Mark a Questgroup as entered for a Character.
*
* @param int $questId ID of Quest to mark as entered
* @param int $questgroupId ID of Questgroup to mark as entered
* @param int $characterId ID of Character that entered the Quest
*/
public function setQuestgroupEntered($questgroupId, $characterId)

View file

@ -64,7 +64,7 @@
*
* @throws \nre\exceptions\IdNotFoundException
* @param int $seminaryId ID of Seminary
* @param int $questgroupshierarchyURL URL of a Questgroup hierarchy
* @param int $questgroupshierarchyUrl URL of a Questgroup hierarchy
* @return array Questgroup hierarchy
*/
public function getHierarchyByUrl($seminaryId, $questgroupshierarchyUrl)
@ -155,8 +155,8 @@
* Check if a title for a Questgroupshierarchy already exists
* for a Seminary.
*
* @param string $title
* @param int $seminaryId
* @param string $title Title to check
* @param int $seminaryId ID of Seminary
* @param int $questgroupshierarchyId Do not check this Questgroupshierarchy (for editing)
* @return Whether title already exists or not
*/
@ -183,8 +183,8 @@
* @param int $userId ID of creating user
* @param int $seminaryId ID of Seminary
* @param int $parentQuestgroupsierarchyId ID of parent Questgroupshierarchy
* @param string $title Title (singular)
* @param string $course Title (plural)
* @param string $titleSingular Title (singular)
* @param string $titlePlural Title (plural)
*/
public function createQuestgroupshierarchy($userId, $seminaryId, $parentQuestgroupsierarchyId, $titleSingular, $titlePlural)
{
@ -224,8 +224,8 @@
* Edit a Questgroupshierarchy.
*
* @param int $questgroupshierarchyId ID of Questgroupshierarchy to edit
* @param string $title New title (singular)
* @param string $course New title (plural)
* @param string $titleSingular New title (singular)
* @param string $titlePlural New title (plural)
*/
public function editQuestgroupshierarchy($questgroupshierarchyId, $titleSingular, $titlePlural)
{
@ -331,7 +331,7 @@
/**
* Delete a Questgroupshierarchy.
*
* @param int $seminaryId ID of the seminary to delete
* @param int $questgroupshierarchyId ID of Questgroups hierarchy to delete
*/
public function deleteQuestgroupshierarchy($questgroupshierarchyId)
{
@ -359,7 +359,7 @@
* @param int $sourceSeminaryId ID of Seminary to copy hierarchy from
* @param int $targetSeminaryId ID of Seminary to copy hierarchy to
* @param array $hierarchy Hierarchy to copy
* @return array $hierarchyIds Mapping of hierarchy IDs from source Seminary to target Seminary
* @param array $hierarchyIds Mapping of hierarchy IDs from source Seminary to target Seminary
*/
private function copyHierarchy($userId, $sourceSeminaryId, $targetSeminaryId, $hierarchy, &$hierarchyIds)
{

View file

@ -71,7 +71,7 @@
* @throws \nre\exceptions\IdNotFoundException
* @param int $seminaryId ID of the corresponding Seminary
* @param int $questgroupId ID of the corresponding Questgroup
* @param string $questURL URL-title of a Quest
* @param string $questUrl URL-title of a Quest
* @return array Quest data
*/
public function getQuestByUrl($seminaryId, $questgroupId, $questUrl)
@ -122,7 +122,7 @@
/**
* Get the first Quest of a Qusetgroup.
*
* @param int $questId ID of Questgroup
* @param int $questgroupId ID of Questgroup
* @return array Data of first Quest
*/
public function getFirstQuestOfQuestgroup($questgroupId)
@ -148,7 +148,7 @@
* Get all Quests a Qusetgroup that do not have a following
* Quest.
*
* @param int $questId ID of Questgroup
* @param int $questgroupId ID of Questgroup
* @return array List of last Quests
*/
public function getLastQuestsOfQuestgroup($questgroupId)
@ -637,7 +637,7 @@
* Set the media for a Quest.
*
* @param int $questId ID of Quest to set media for
* @param int $questmediaId ID of Questsmedia to set
* @param int $questsmediaId ID of Questsmedia to set
*/
public function setQuestmedia($questId, $questsmediaId)
{
@ -686,7 +686,7 @@
* Copy all Quests from a Seminary.
*
* @param int $userId ID of creating user
* @param int $seminaryId ID of Seminary to copy from
* @param int $sourceSeminaryId ID of Seminary to copy from
* @param array $questgroupIds Mapping of Questgroup-IDs from source Seminary to target Seminary
* @param array $seminaryMediaIds Mapping of Seminary-media-IDs from source Seminary to target Seminary (optional)
* @return array Mapping of Quest-IDs from source Seminary to target Seminary

View file

@ -278,7 +278,7 @@
* Set the media for a Quest text.
*
* @param int $questtextId ID of Quest text to set media for
* @param int $questmediaId ID of Questsmedia to set
* @param int $questsmediaId ID of Questsmedia to set
*/
public function setQuestmedia($questtextId, $questsmediaId)
{

View file

@ -463,7 +463,7 @@
/**
* Delete a Questsubtopic.
*
* @param int $questsubtopicId ID of Questsubtopic to delete
* @param int $questtopicId ID of Questsubtopic to delete
*/
public function deleteQuestsubtopic($questtopicId)
{

View file

@ -308,6 +308,8 @@
* @param string $title New title of Seminary
* @param string $course New course of Seminary
* @param string $description New description of Seminary
* @param float $latitude GPS-latitude of point to zoom map to
* @param float $longitude GPS-longitude of point to zoom map to
*/
public function editSeminary($seminaryId, $title, $course, $description, $latitude, $longitude)
{

View file

@ -57,8 +57,8 @@
/**
* Set the value of a Seminary field for a Character.
*
* @param int $characterId ID of Character
* @param int $seminarycharacterfieldId ID of seminarycharacterfield to set value of
* @param int $characterId ID of Character
* @param string $value Value to set
*/
public function setSeminaryFieldOfCharacter($seminarycharacterfieldId, $characterId, $value)

View file

@ -89,7 +89,7 @@
* Get an upload by its ID.
*
* @throws \nre\exceptions\IdNotFoundException
* @param int $uploadId ID of the uploaded file
* @param int $seminaryuploadId ID of the uploaded file
* @return array Upload data
*/
public function getSeminaryuploadById($seminaryuploadId)
@ -115,7 +115,7 @@
*
* @throws \nre\exceptions\IdNotFoundException
* @param int $seminaryId ID of Seminary
* @param int $uploadId ID of the uploaded file
* @param int $seminaryuploadUrl ID of the uploaded file
* @return array Upload data
*/
public function getSeminaryuploadByUrl($seminaryId, $seminaryuploadUrl)

View file

@ -38,6 +38,8 @@
* Get count of registered users.
*
* @param string $username Only get users with the given username (optional)
* @param string $name Only get users with the given name (optional)
* @param string $email Only get users with the given email address (optional)
* @return int Count of users
*/
public function getUsersCount($username=null, $name=null, $email=null)
@ -75,6 +77,8 @@
* @throws \nre\exceptions\ParamsNotValidException
* @param string $sort Field to sort by
* @param string $username Only get users with the given username (optional)
* @param string $name Only get users with the given name (optional)
* @param string $email Only get users with the given email address (optional)
* @param int $limit Limit amount of Characters (optional)
* @param int $offset Offset (optional)
* @return array Users

View file

@ -22,6 +22,7 @@
</logging>
<files>
<directory>.</directory>
<ignore>app/lib/*</ignore>
<ignore>doc/*</ignore>
<ignore>logs/*</ignore>
<ignore>media/*</ignore>

View file

@ -193,7 +193,7 @@
/**
* Save Characters submitted answer for one Boss-Fight-Stage.
*
* @param int $regexId ID of list
* @param int $stageId ID of list
* @param int $characterId ID of Character
*/
public function setCharacterSubmission($stageId, $characterId)
@ -214,7 +214,7 @@
/**
* Get answer of one Boss-Fight-Stage submitted by Character.
*
* @param int $regexId ID of list
* @param int $stageId ID of list
* @param int $characterId ID of Character
* @return boolean Stage taken
*/

View file

@ -173,7 +173,7 @@
/**
* Save Characters submitted answer for one choiceinput-list.
*
* @param int $regexId ID of list
* @param int $listId ID of list
* @param int $characterId ID of Character
* @param string $answer Submitted answer for this list
*/
@ -211,7 +211,7 @@
/**
* Get answer of one choiceinput-list submitted by Character.
*
* @param int $regexId ID of list
* @param int $listId ID of list
* @param int $characterId ID of Character
* @return int Submitted answer for this list or null
*/

View file

@ -79,7 +79,7 @@
/**
* Save Characters submitted answer for one crossword-word.
*
* @param int $regexId ID of word
* @param int $wordId ID of word
* @param int $characterId ID of Character
* @param string $answer Submitted answer for this word
*/
@ -102,7 +102,7 @@
/**
* Get answer of one crossword-word submitted by Character.
*
* @param int $regexId ID of lisword
* @param int $wordId ID of word
* @param int $characterId ID of Character
* @return int Submitted answer for this word or null
*/

View file

@ -32,6 +32,11 @@
*/
const KEY_QUESTTYPEDATA_N_CORRECT_ANSWRES = 'nCorrectAnswers';
/**
* Number of correct answers
*
* @var int
*/
private $nCorrectAnswers = null;

View file

@ -31,7 +31,7 @@
* Save the answer of a Character group for a Station.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $charactergroup Current Character group data
@ -53,7 +53,7 @@
* Check if answer of a Character group for a Station matches the correct one.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $charactergroup Current Character group data
@ -93,7 +93,7 @@
* Show the task of a Station.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $charactergroup Current Character group data

View file

@ -31,7 +31,7 @@
* Save the answer of a Character group for a Station.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $charactergroup Current Character group data
@ -51,7 +51,7 @@
* Check if answer of a Character group for a Station matches the correct one.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $charactergroup Current Character group data
@ -75,7 +75,7 @@
* Show the task of a Station.
*
* @param array $seminary Current Seminary data
* @param array $questgroup Current Questgroup data
* @param array $groupsgroup Current Groups group data
* @param array $quest Current Quest data
* @param array $station Current Station data
* @param array $charactergroup Current Character group data