Minor - PHPDoc updates as suggested by @scrutinizer-auto-fixer

pull/2487/head
Yannick Warnier 8 years ago
parent 46f335d40b
commit e73ca6ec6a
  1. 9
      main/gradebook/lib/be/surveylink.class.php
  2. 2
      main/inc/lib/TicketManager.php
  3. 12
      main/inc/lib/document.lib.php
  4. 4
      main/inc/lib/events.lib.php
  5. 2
      main/inc/lib/fileUpload.lib.php
  6. 2
      main/inc/lib/myspace.lib.php
  7. 3
      main/inc/lib/search/xapian/XapianIndexer.class.php
  8. 2
      main/inc/lib/text.lib.php
  9. 2
      main/inc/lib/usergroup.lib.php
  10. 2
      main/install/install.lib.php
  11. 4
      main/lp/learnpathList.class.php
  12. 2
      main/lp/openoffice_presentation.class.php
  13. 2
      plugin/openmeetings/lib/openmeetings.class.php
  14. 28
      plugin/vchamilo/cli/clilib.php
  15. 4
      src/Chamilo/CoreBundle/Entity/Course.php
  16. 2
      src/Chamilo/CoreBundle/Entity/GradebookScoreLog.php
  17. 4
      src/Chamilo/CoreBundle/Entity/SequenceResource.php
  18. 4
      src/Chamilo/CoreBundle/Entity/Session.php
  19. 2
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php
  20. 2
      src/Chamilo/CourseBundle/Entity/CLp.php
  21. 2
      src/Chamilo/CourseBundle/Entity/CLpItem.php
  22. 12
      src/Chamilo/CourseBundle/Entity/CQuizAnswer.php
  23. 2
      src/Chamilo/CourseBundle/Entity/CQuizQuestion.php
  24. 2
      src/Chamilo/CourseBundle/Entity/CToolIntro.php
  25. 2
      src/Chamilo/UserBundle/Entity/User.php

@ -277,7 +277,8 @@ class SurveyLink extends AbstractLink
}
/**
* @return array|bool|mixed
* Get the survey data from the c_survey table with the current object id
* @return mixed
*/
private function get_survey_data()
{
@ -291,13 +292,17 @@ class SurveyLink extends AbstractLink
WHERE
c_id = '.$this->course_id.' AND
survey_id = '.intval($this->get_ref_id()).' AND
session_id='.intval($session_id);
session_id = '.intval($session_id);
$query = Database::query($sql);
$this->survey_data = Database::fetch_array($query);
}
return $this->survey_data;
}
/**
* Get the name of the icon for this tool
* @return string
*/
public function get_icon_name()
{
return 'survey';

@ -1309,8 +1309,8 @@ class TicketManager
}
/**
* Send notification to a user through the internal messaging system
* @param int $ticketId
* @param int $userId
* @param string $title
* @param string $message
* @param int $onlyToUserId

@ -1124,12 +1124,12 @@ class DocumentManager
* This deletes a document by changing visibility to 2, renaming it to filename_DELETED_#id
* Files/folders that are inside a deleted folder get visibility 2
*
* @param array $_course
* @param string $path, path stored in the database
* @param string $base_work_dir, path to the documents folder (if not defined, $documentId must be used)
* @param int $sessionId The ID of the session, if any
* @param int $documentId The document id, if available
* @param int $groupId iid
* @param array $_course
* @param string $path Path stored in the database
* @param string $base_work_dir Path to the documents folder (if not defined, $documentId must be used)
* @param int $sessionId The ID of the session, if any
* @param int $documentId The document id, if available
* @param int $groupId iid
* @return boolean true/false
* @todo now only files/folders in a folder get visibility 2, we should rename them too.
* @todo We should be able to get rid of this later when using only documentId (check further usage)

@ -813,11 +813,11 @@ class Event
/**
* Save the new message for one event and for one language
*
* @param string $eventName
* @param string $event_name
* @param array $users
* @param string $message
* @param string $subject
* @param string $eventMessageLanguage
* @param string $event_message_language
* @param int $activated
*/
public static function save_event_type_message($event_name, $users, $message, $subject, $event_message_language, $activated)

@ -194,7 +194,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
* @param string $uploadPath Example: /folder1/folder2/
* @param int $userId
* @param int $groupId group.id
* @param int $toUserId, NULL for everybody
* @param int $toUserId User ID, or NULL for everybody
* @param int $unzip 1/0
* @param string $whatIfFileExists overwrite, rename or warn if exists (default)
* @param boolean $output Optional output parameter.

@ -1978,7 +1978,7 @@ class MySpace
/**
* Checks if there are repeted users in a given array
* @param array $usernames list of the usernames in the uploaded file
* @param array $user_array['username'] and $user_array['sufix'] where sufix is the number part in a login i.e -> jmontoya2
* @param array $user_array $user_array['username'] and $user_array['sufix'] where sufix is the number part in a login i.e -> jmontoya2
* @return array with the $usernames array and the $user_array array
* @author Julio Montoya
*/

@ -286,7 +286,8 @@ abstract class XapianIndexer
* Replace a document in the actual db
*
* @param XapianDocument $doc xapian document to push into the db
* @param Xapian::docid $did xapian document id of the document to replace
* @param int $did xapian document id of the document to replace
* @return mixed
*/
function replace_document($doc, $did)
{

@ -75,8 +75,8 @@ function api_set_encoding_html(&$string, $encoding)
/**
* Returns the title of a html document.
* @param string $string The contents of the input document.
* @param string $output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend.
* @param string $input_encoding The encoding of the input document. If the value is not set, it is detected.
* @param string $$output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend.
* @return string The retrieved title, html-entities and extra-whitespace between the words are cleaned.
*/
function api_get_title_html(&$string, $output_encoding = null, $input_encoding = null)

@ -1087,7 +1087,7 @@ class UserGroup extends Model
* If an empty name is provided, then old user photos are deleted only,
* @see UserManager::delete_user_picture() as the prefered way for deletion.
* @param string $source_file The full system name of the image from which user photos will be created.
* @return string/bool Returns the resulting common file name of created images which usually should be stored in database.
* @return mixed Returns the resulting common file name of created images which usually should be stored in database.
* When an image is removed the function returns an empty string. In case of internal error or negative validation it returns FALSE.
*/
public function update_group_picture($group_id, $file = null, $source_file = null)

@ -145,7 +145,7 @@ function checkAccessUrl()
* Returns a textual value ('ON' or 'OFF') based on a requester 2-state ini- configuration setting.
*
* @param string $val a php ini value
* @return boolean: ON or OFF
* @return bool ON or OFF
* @author Joomla <http://www.joomla.org>
*/
function getPhpSetting($val)

@ -189,8 +189,8 @@ class LearnpathList
);
$names[$row->getName()] = $row->getIid();
}
$this->alpha_list = asort($names);
asort($names);
$this->alpha_list = $names;
}
/**

@ -175,7 +175,7 @@ class OpenofficePresentation extends OpenofficeDocument
''
);
if ($this->first_item == 0) {
$this->first_item = $previous;
$this->first_item = intval($previous);
}
}
// Code for text indexing.

@ -178,7 +178,7 @@ class OpenMeetings
//$room->roomtypes_id = $room->roomtypes_id;
$room->comment = urlencode(get_lang('Course').': '.$params['meeting_name'].' - '.$_configuration['software_name']);
//$room->numberOfPartizipants = $room->numberOfPartizipants;
$room->ispublic = $room->getString('isPublic', 'false');
$room->ispublic = boolval($room->getString('isPublic', 'false'));
//$room->appointment = $room->getString('appointment');
//$room->isDemoRoom = $room->getString('isDemoRoom');
//$room->demoTime = $room->demoTime;

@ -2,17 +2,18 @@
exit;
/**
* Opens and parses/checks a VChamilo instance definition file
* @param string $location
*
*/
* Opens and parses/checks a VChamilo instance definition file
* @param string $nodelistlocation
* @param string $plugin
* @return mixed
*/
function vchamilo_parse_csv_nodelist($nodelistlocation = '', $plugin = null) {
global $_configuration;
$vnodes = array();
if (empty($nodelistlocation)) {
$nodelistlocation = $_configuratioh['root_sys'].'/plugin/vchamilo/nodelist.csv';
$nodelistlocation = $_configuration['root_sys'].'/plugin/vchamilo/nodelist.csv';
}
// decode file
@ -162,9 +163,12 @@ function vchamilo_parse_csv_nodelist($nodelistlocation = '', $plugin = null) {
}
/**
* Check a CSV input line format for empty or commented lines
* Ensures compatbility to UTF-8 BOM or unBOM formats
*/
* Check a CSV input line format for empty or commented lines
* Ensures compatbility to UTF-8 BOM or unBOM formats
* @param resource $text
* @param bool $resetfirst
* @return bool
*/
function vchamilo_is_empty_line_or_format(&$text, $resetfirst = false) {
global $CFG;
@ -193,7 +197,7 @@ function vchamilo_is_empty_line_or_format(&$text, $resetfirst = false) {
* @param string $prompt text prompt, should include possible options
* @param string $default default value when enter pressed
* @param array $options list of allowed options, empty means any text
* @param bool $casesensitive true if options are case sensitive
* @param bool $casesensitiveoptions true if options are case sensitive
* @return string entered text
*/
function cli_input($prompt, $default = '', array $options = null, $casesensitiveoptions = false) {
@ -329,11 +333,11 @@ function cli_problem($text) {
* Write to standard out and error with exit in error.
*
* @param string $text
* @param int $errorcode
* @param int $errorCode
* @return void (does not return)
*/
function cli_error($text, $errorcode = 1) {
function cli_error($text, $errorCode = 1) {
fwrite(STDERR, $text);
fwrite(STDERR, "\n");
die($errorcode);
die($errorCode);
}

@ -964,7 +964,7 @@ class Course
*/
public function setSubscribe($subscribe)
{
$this->subscribe = intval($subscribe);
$this->subscribe = boolval($subscribe);
return $this;
}
@ -988,7 +988,7 @@ class Course
*/
public function setUnsubscribe($unsubscribe)
{
$this->unsubscribe = intval($unsubscribe);
$this->unsubscribe = boolval($unsubscribe);
return $this;
}

@ -128,7 +128,7 @@ class GradebookScoreLog
/**
* Set the achieved score
* @param int $score
* @param float $score
*
* @return $this
*/

@ -66,8 +66,8 @@ class SequenceResource
}
/**
* @param string $type
*
* Set the integer type
* @param int $type
* @return SequenceResource
*/
public function setType($type)

@ -61,7 +61,7 @@ class Session
private $description;
/**
* @var string
* @var bool
*
* @ORM\Column(name="show_description", type="boolean", nullable=true)
*/
@ -232,7 +232,7 @@ class Session
$this->courses = new ArrayCollection();
$this->users = new ArrayCollection();
$this->userCourseSubscriptions = new ArrayCollection();
$this->showDescription = 0;
$this->showDescription = false;
$this->category = null;
$this->studentPublications = new ArrayCollection();
}

@ -2870,7 +2870,7 @@ class CourseRestorer
* @param boolean Option Overwrite
* @param string $source
* @param string $dest
* @return void()
* @return void
* @deprecated
*/
public function allow_create_all_directory($source, $dest, $overwrite = false)

@ -275,7 +275,7 @@ class CLp
$this->defaultEncoding = 'UTF-8';
$this->displayOrder = 0;
$this->contentLocal = 'local';
$this->preventReinit = 1;
$this->preventReinit = true;
$this->useMaxScore = 1;
$this->createdOn = new \DateTime();
}

@ -202,7 +202,7 @@ class CLpItem
*/
public function __construct()
{
$this->maxScore = 100;
$this->maxScore = 100.0;
}
/**

@ -125,7 +125,7 @@ class CQuizAnswer
$this->idAuto = 0;
$this->correct = null;
$this->comment = null;
$this->ponderation = 0;
$this->ponderation = 0.0;
$this->hotspotCoordinates = null;
$this->hotspotType = null;
$this->destination = null;
@ -248,20 +248,20 @@ class CQuizAnswer
}
/**
* Set ponderation
* Set weight
*
* @param float $ponderation
* @param float $weight
* @return CQuizAnswer
*/
public function setPonderation($ponderation)
public function setPonderation($weight)
{
$this->ponderation = empty($ponderation) ? 0 : $ponderation;
$this->ponderation = empty($weight) ? 0.0 : $weight;
return $this;
}
/**
* Get ponderation
* Get weight
*
* @return float
*/

@ -110,7 +110,7 @@ class CQuizQuestion
*/
public function __construct()
{
$this->ponderation = 0;
$this->ponderation = 0.0;
}
/**

@ -81,7 +81,7 @@ class CToolIntro
/**
* Set id
*
* @param string $id
* @param int $id
* @return CToolIntro
*/
public function setId($id)

@ -441,7 +441,7 @@ class User implements UserInterface //implements ParticipantInterface, ThemeUser
{
$this->status = self::STUDENT;
$this->salt = sha1(uniqid(null, true));
$this->active = 1;
$this->active = true;
$this->registrationDate = new \DateTime();
$this->authSource = 'platform';
$this->courses = new ArrayCollection();

Loading…
Cancel
Save