Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
pull/2487/head
Scrutinizer Auto-Fixer 9 years ago
parent 9b71ba59d4
commit 1a423c4bde
  1. 10
      main/inc/lib/formvalidator/FormValidator.class.php
  2. 2
      main/inc/lib/hook/HookManagement.php
  3. 15
      main/inc/lib/link.lib.php
  4. 3
      main/inc/lib/login.lib.php
  5. 10
      main/inc/lib/plugin.class.php
  6. 9
      main/inc/lib/thematic.lib.php
  7. 1
      main/user/subscribe_user.php
  8. 1
      main/user/user.php
  9. 3
      main/webservices/access_url.php
  10. 2
      src/Chamilo/CoreBundle/Entity/AccessUrlRelUserGroup.php
  11. 8
      src/Chamilo/CoreBundle/Entity/ChatVideo.php
  12. 2
      src/Chamilo/CoreBundle/Entity/CourseRelUser.php
  13. 2
      src/Chamilo/CoreBundle/Entity/Language.php
  14. 2
      src/Chamilo/CoreBundle/Entity/Message.php
  15. 4
      src/Chamilo/CoreBundle/Entity/SequenceResource.php
  16. 4
      src/Chamilo/CoreBundle/Entity/SkillRelUser.php
  17. 2
      src/Chamilo/CoreBundle/Entity/SkillRelUserComment.php
  18. 2
      src/Chamilo/CourseBundle/Entity/CForumThread.php
  19. 4
      src/Chamilo/FaqBundle/Entity/QuestionTranslation.php
  20. 24
      src/Chamilo/ThemeBundle/Model/MenuItemInterface.php

@ -233,8 +233,8 @@ EOT;
} }
/** /**
* @param $name * @param string $name
* @param $label * @param string $label
* @param array $options * @param array $options
* @param array $attributes * @param array $attributes
* @throws * @throws
@ -1063,7 +1063,7 @@ EOT;
/** /**
* This function has been created for avoiding changes directly within QuickForm class. * This function has been created for avoiding changes directly within QuickForm class.
* When we use it, the element is threated as 'required' to be dealt during validation. * When we use it, the element is threated as 'required' to be dealt during validation.
* @param array $element The array of elements * @param array $elements The array of elements
* @param string $message The message displayed * @param string $message The message displayed
*/ */
public function add_multiple_required_rule($elements, $message) public function add_multiple_required_rule($elements, $message)
@ -1339,12 +1339,12 @@ EOT;
} }
/** /**
* @param $name * @param string $name
* @param $label * @param $label
* @param bool $required * @param bool $required
* @param array $attributes * @param array $attributes
* @param bool $allowNegative * @param bool $allowNegative
* @param null $minValue * @param integer $minValue
* @param null $maxValue * @param null $maxValue
*/ */
public function addFloat( public function addFloat(

@ -138,7 +138,7 @@ class HookManagement implements HookManagementInterface
/** /**
* Return a list an associative array where keys are the active hook observer class name * Return a list an associative array where keys are the active hook observer class name
* @param $eventName * @param string $eventName
* *
* @return array * @return array
*/ */

@ -470,6 +470,7 @@ class Link extends Model
* *
* Get link info * Get link info
* @param int link id * @param int link id
* @param integer $id
* @return array link info * @return array link info
* *
**/ **/
@ -854,7 +855,7 @@ class Link extends Model
} }
/** /**
* @param $categoryId * @param integer $categoryId
* @param $courseId * @param $courseId
* @param $sessionId * @param $sessionId
* @param bool $withBaseContent * @param bool $withBaseContent
@ -941,8 +942,8 @@ class Link extends Model
* @author Julio Montoya * @author Julio Montoya
* *
* @param $catid * @param $catid
* @param $courseId * @param integer $courseId
* @param $session_id * @param integer $session_id
* @return string * @return string
*/ */
public static function showLinksPerCategory($catid, $courseId, $session_id) public static function showLinksPerCategory($catid, $courseId, $session_id)
@ -1150,6 +1151,8 @@ class Link extends Model
/** /**
* Displays the edit, delete and move icons * Displays the edit, delete and move icons
* @param int Category ID * @param int Category ID
* @param integer $currentCategory
* @param integer $countCategories
* @return string * @return string
* *
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
@ -1290,6 +1293,7 @@ class Link extends Model
/** /**
* CSV file import functions * CSV file import functions
* @author René Haentjens , Ghent University * @author René Haentjens , Ghent University
* @param string $catname
*/ */
public static function get_cat($catname) public static function get_cat($catname)
{ {
@ -1324,6 +1328,11 @@ class Link extends Model
/** /**
* CSV file import functions * CSV file import functions
* @author René Haentjens , Ghent University * @author René Haentjens , Ghent University
* @param string $url
* @param string $title
* @param string $description
* @param string $on_homepage
* @param string $hidden
*/ */
public static function put_link($url, $cat, $title, $description, $on_homepage, $hidden) public static function put_link($url, $cat, $title, $description, $on_homepage, $hidden)
{ {

@ -276,6 +276,7 @@ class Login
* @global bool $is_platformAdmin * @global bool $is_platformAdmin
* @global bool $is_allowedCreateCourse * @global bool $is_allowedCreateCourse
* @global object $_user * @global object $_user
* @param boolean $reset
*/ */
public static function init_user($user_id, $reset) public static function init_user($user_id, $reset)
{ {
@ -366,7 +367,7 @@ class Login
* @global type $is_allowed_in_course * @global type $is_allowed_in_course
* *
* @param type $course_id * @param type $course_id
* @param type $reset * @param boolean $reset
*/ */
static function init_course($course_id, $reset) static function init_course($course_id, $reset)
{ {

@ -150,7 +150,7 @@ class Plugin
/** /**
* Returns the contents of the CSS defined by the plugin * Returns the contents of the CSS defined by the plugin
* @return array * @return string
*/ */
public function get_css() public function get_css()
{ {
@ -168,7 +168,7 @@ class Plugin
/** /**
* Returns an HTML form (generated by FormValidator) of the plugin settings * Returns an HTML form (generated by FormValidator) of the plugin settings
* @return string FormValidator-generated form * @return FormValidator FormValidator-generated form
*/ */
public function get_settings_form() public function get_settings_form()
{ {
@ -390,7 +390,7 @@ class Plugin
* @param boolean $add_tool_link Whether to add a tool link or not * @param boolean $add_tool_link Whether to add a tool link or not
* (some tools might just offer a configuration section and act on the backend) * (some tools might just offer a configuration section and act on the backend)
* *
* @return boolean False on error, null otherwise * @return boolean|null False on error, null otherwise
*/ */
public function install_course_fields($courseId, $add_tool_link = true) public function install_course_fields($courseId, $add_tool_link = true)
{ {
@ -501,7 +501,7 @@ class Plugin
* tool on the course's homepage * tool on the course's homepage
* @param int $courseId * @param int $courseId
* *
* @return void * @return false|null
*/ */
public function uninstall_course_fields($courseId) public function uninstall_course_fields($courseId)
{ {
@ -607,7 +607,7 @@ class Plugin
* @param string $tabName * @param string $tabName
* @param string $url * @param string $url
* *
* @return boolean * @return false|string
*/ */
public function addTab($tabName, $url) public function addTab($tabName, $url)
{ {

@ -242,6 +242,9 @@ class Thematic
/** /**
* get thematic list * get thematic list
* @param int Thematic id (optional), get list by id * @param int Thematic id (optional), get list by id
* @param integer $thematic_id
* @param string $course_code
* @param integer $session_id
* @return array Thematic data * @return array Thematic data
*/ */
public static function get_thematic_list( public static function get_thematic_list(
@ -799,6 +802,7 @@ class Thematic
/** /**
* delete thematic advance * delete thematic advance
* @param int Thematic advance id * @param int Thematic advance id
* @param integer $thematic_advance_id
* @return int Affected rows * @return int Affected rows
*/ */
public function thematic_advance_destroy($thematic_advance_id) public function thematic_advance_destroy($thematic_advance_id)
@ -1116,6 +1120,7 @@ class Thematic
/** /**
* update done thematic advances from thematic details interface * update done thematic advances from thematic details interface
* @param int Thematic id * @param int Thematic id
* @param integer $thematic_advance_id
* @return int Affected rows * @return int Affected rows
*/ */
public function update_done_thematic_advances($thematic_advance_id) public function update_done_thematic_advances($thematic_advance_id)
@ -1343,6 +1348,7 @@ class Thematic
* Get average of advances by thematic * Get average of advances by thematic
* @param int Thematic id * @param int Thematic id
* @param string Course code (optional) * @param string Course code (optional)
* @param string $course_code
* @return float Average of thematic advances * @return float Average of thematic advances
*/ */
public function get_average_of_advances_by_thematic($thematic_id, $course_code = null) public function get_average_of_advances_by_thematic($thematic_id, $course_code = null)
@ -1407,6 +1413,7 @@ class Thematic
* @param string Content * @param string Content
* @param string Date and time * @param string Date and time
* @param int Duration in hours * @param int Duration in hours
* @param integer $id
* @return void * @return void
*/ */
public function set_thematic_advance_attributes( public function set_thematic_advance_attributes(
@ -1437,7 +1444,7 @@ class Thematic
/** /**
* get thematic id * get thematic id
* @return void * @return integer
*/ */
public function get_thematic_id() public function get_thematic_id()
{ {

@ -710,7 +710,6 @@ function reg_filter($user_id)
* lock = the user can no longer use this account * lock = the user can no longer use this account
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @param int $active the current state of the account * @param int $active the current state of the account
* @param int $user_id The user id
* @param string $url_params * @param string $url_params
* @return string Some HTML-code with the lock/unlock button * @return string Some HTML-code with the lock/unlock button
*/ */

@ -933,7 +933,6 @@ function get_user_data($from, $number_of_items, $column, $direction)
* lock = the user can no longer use this account * lock = the user can no longer use this account
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @param int $active the current state of the account * @param int $active the current state of the account
* @param int $user_id The user id
* @param string $urlParams * @param string $urlParams
* *
* @return string Some HTML-code with the lock/unlock button * @return string Some HTML-code with the lock/unlock button

@ -17,6 +17,9 @@ define('WS_ERROR_NOT_FOUND_RESULT', 2);
define('WS_ERROR_INVALID_INPUT', 3); define('WS_ERROR_INVALID_INPUT', 3);
define('WS_ERROR_SETTING', 4); define('WS_ERROR_SETTING', 4);
/**
* @param integer $code
*/
function return_error($code) { function return_error($code) {
$fault = null; $fault = null;
switch ($code) { switch ($code) {

@ -40,7 +40,7 @@ class AccessUrlRelUserGroup
* Set accessUrlId * Set accessUrlId
* *
* @param integer $accessUrlId * @param integer $accessUrlId
* @return AccessUrlRelUser * @return AccessUrlRelUserGroup
*/ */
public function setAccessUrlId($accessUrlId) public function setAccessUrlId($accessUrlId)
{ {

@ -61,7 +61,7 @@ class ChatVideo
* Set fromUser * Set fromUser
* *
* @param integer $fromUser * @param integer $fromUser
* @return Chat * @return ChatVideo
*/ */
public function setFromUser($fromUser) public function setFromUser($fromUser)
{ {
@ -84,7 +84,7 @@ class ChatVideo
* Set toUser * Set toUser
* *
* @param integer $toUser * @param integer $toUser
* @return Chat * @return ChatVideo
*/ */
public function setToUser($toUser) public function setToUser($toUser)
{ {
@ -107,7 +107,7 @@ class ChatVideo
* Set room_name * Set room_name
* *
* @param string $roomName * @param string $roomName
* @return Chat * @return ChatVideo
*/ */
public function setRoomName($roomName) public function setRoomName($roomName)
{ {
@ -130,7 +130,7 @@ class ChatVideo
* Set datetime * Set datetime
* *
* @param \DateTime $datetime * @param \DateTime $datetime
* @return Chat * @return ChatVideo
*/ */
public function setDatetime($datetime) public function setDatetime($datetime)
{ {

@ -139,7 +139,7 @@ class CourseRelUser
} }
/** /**
* @param $user * @param User $user
* @return $this * @return $this
*/ */
public function setUser($user) public function setUser($user)

@ -231,7 +231,7 @@ class Language
/** /**
* Get id * Get id
* *
* @return boolean * @return integer
*/ */
public function getId() public function getId()
{ {

@ -320,7 +320,7 @@ class Message
* Set votes * Set votes
* *
* @param integer $votes * @param integer $votes
* @return integer * @return Message
*/ */
public function setVotes($votes) public function setVotes($votes)
{ {

@ -58,7 +58,7 @@ class SequenceResource
} }
/** /**
* @return string * @return integer
*/ */
public function getType() public function getType()
{ {
@ -123,7 +123,7 @@ class SequenceResource
} }
/** /**
* @param mixed $sequence * @param Sequence $sequence
* @return $this * @return $this
*/ */
public function setSequence(Sequence $sequence) public function setSequence(Sequence $sequence)

@ -121,7 +121,7 @@ class SkillRelUser
/** /**
* Get user * Get user
* @return \User * @return User
*/ */
public function getUser() public function getUser()
{ {
@ -390,7 +390,7 @@ class SkillRelUser
/** /**
* Calculate the average value from the feedback comments * Calculate the average value from the feedback comments
* @return int * @return string
*/ */
public function getAverage() public function getAverage()
{ {

@ -108,7 +108,7 @@ class SkillRelUserComment
/** /**
* Get feedbackDateTime * Get feedbackDateTime
* @return type * @return \DateTime
*/ */
public function getFeedbackDateTime() public function getFeedbackDateTime()
{ {

@ -181,7 +181,7 @@ class CForumThread
/** /**
* set threadPeerQualify * set threadPeerQualify
* @param $threadPeerQualify * @param integer $threadPeerQualify
* @return $this * @return $this
*/ */
public function setThreadPeerQualify($threadPeerQualify) public function setThreadPeerQualify($threadPeerQualify)

@ -58,7 +58,7 @@ class QuestionTranslation
/** /**
* @param string $headline * @param string $headline
* @return CategoryTranslation * @return QuestionTranslation
*/ */
public function setHeadline($headline) public function setHeadline($headline)
{ {
@ -77,7 +77,7 @@ class QuestionTranslation
/** /**
* @param string $body * @param string $body
* @return CategoryTranslation * @return QuestionTranslation
*/ */
public function setBody($body) public function setBody($body)
{ {

@ -20,29 +20,29 @@ interface MenuItemInterface {
public function getIdentifier(); public function getIdentifier();
/** /**
* @return mixed * @return string
*/ */
public function getLabel(); public function getLabel();
/** /**
* @return mixed * @return string
*/ */
public function getRoute(); public function getRoute();
/** /**
* @return mixed * @return boolean
*/ */
public function isActive(); public function isActive();
/** /**
* @param $isActive * @param boolean $isActive
* *
* @return mixed * @return MenuItemModel
*/ */
public function setIsActive($isActive); public function setIsActive($isActive);
/** /**
* @return mixed * @return boolean
*/ */
public function hasChildren(); public function hasChildren();
@ -54,14 +54,14 @@ interface MenuItemInterface {
/** /**
* @param MenuItemInterface $child * @param MenuItemInterface $child
* *
* @return mixed * @return MenuItemModel
*/ */
public function addChild(MenuItemInterface $child); public function addChild(MenuItemInterface $child);
/** /**
* @param MenuItemInterface $child * @param MenuItemInterface $child
* *
* @return mixed * @return MenuItemModel
*/ */
public function removeChild(MenuItemInterface $child); public function removeChild(MenuItemInterface $child);
@ -76,24 +76,24 @@ interface MenuItemInterface {
public function getBadge(); public function getBadge();
/** /**
* @return mixed * @return string
*/ */
public function getBadgeColor(); public function getBadgeColor();
/** /**
* @return mixed * @return MenuItemInterface
*/ */
public function getParent(); public function getParent();
/** /**
* @return mixed * @return boolean
*/ */
public function hasParent(); public function hasParent();
/** /**
* @param MenuItemInterface $parent * @param MenuItemInterface $parent
* *
* @return mixed * @return MenuItemModel
*/ */
public function setParent(MenuItemInterface $parent = null); public function setParent(MenuItemInterface $parent = null);

Loading…
Cancel
Save