Commit 6a703ead authored by cconard96's avatar cconard96 Committed by Johan Cwiklinski
Browse files

Fix some param and return types

parent 19864caa
......@@ -2442,7 +2442,7 @@ abstract class API extends CommonGLPI {
* You can pass an array of array, this method is recursive.
*
* @param array $fields to check and transform
* @param boolean $params array of option to enable, could be :
* @param array $params array of option to enable, could be :
* - expand_dropdowns (default false)
* - get_hateoas (default true)
*
......
......@@ -95,9 +95,9 @@ class Appliance_Item extends CommonDBRelation {
/**
* Print enclosure items
*
* @param CommonDBTM $item CommonDBTM object wanted
* @param Appliance $appliance Appliance object wanted
*
* @return void
* @return void|boolean (display) Returns false if there is a rights error.
**/
static function showItems(Appliance $appliance) {
global $DB;
......
......@@ -221,7 +221,7 @@ class Appliance_Item_Relation extends CommonDBRelation {
* see self::showListForApplianceItem docblock
*
* @param CommonDBTM $item the item where the mini list will be displayed,
* we use this to check entities/is_recursive attributres
* we use this to check entities/is_recursive attributes
* @param bool $canedit do we have the right to edit
*
* @return string the javascript
......
......@@ -682,10 +682,11 @@ class Auth extends CommonGLPI {
/**
* Manage use authentication and initialize the session
*
* @param string $login_name Login
* @param string $login_password Password
* @param boolean $noauto (false by default)
* @param string $login_auth type of auth - id of the auth
* @param string $login_name Login
* @param string $login_password Password
* @param boolean $noauto (false by default)
* @param bool $remember_me
* @param string $login_auth Type of auth - id of the auth
*
* @return boolean (success)
*/
......
......@@ -327,7 +327,7 @@ class AuthLDAP extends CommonDBTM {
* @param array $options Options
* - target for the form
*
* @return void (display)
* @return void|boolean (display) Returns false if there is a rights error.
*/
function showForm($ID, $options = []) {
......@@ -3437,7 +3437,7 @@ class AuthLDAP extends CommonDBTM {
/**
* Search user
*
* @param resource $authldap AuthLDAP object
* @param AuthLDAP $authldap AuthLDAP object
*
* @return void
*/
......@@ -3731,8 +3731,9 @@ class AuthLDAP extends CommonDBTM {
/**
* Does LDAP user already exists in the database?
*
* @param string $name User login/name
* @param string $sync Sync field
* @param string $name User login/name
* @param integer $authldaps_id LDAP authentication server ID
* @param ?string $sync Sync field
*
* @return false|User
*/
......@@ -3863,7 +3864,7 @@ class AuthLDAP extends CommonDBTM {
/**
* Check if text representation of an objectguid is valid
*
* @param string $string Strign representation
* @param string $guid_str String representation
*
* @return boolean
*/
......
......@@ -107,12 +107,12 @@ class Budget extends CommonDropdown{
/**
* Print the contact form
*
* @param $ID integer ID of the item
* @param $options array of possible options:
* @param integer $ID Integer ID of the item
* @param array $options Array of possible options:
* - target for the Form
* - withtemplate : template or basic item
*
* @return void
* @return void|boolean (display) Returns false if there is a rights error.
**/
function showForm($ID, $options = []) {
......
......@@ -75,6 +75,8 @@ interface CalDAVCompatibleItemInterface {
/**
* Get input array from a VCalendar object.
*
* @param VCalendar $vcalendar
*
* @return array
*
* @see https://tools.ietf.org/html/rfc2445
......
......@@ -245,7 +245,7 @@ trait CalDAVUriUtilTrait {
/**
* Returns calendar item for given path.
*
* @param string $uid
* @param string $path
*
* @return CalDAVCompatibleItemInterface|null
*/
......
......@@ -432,7 +432,7 @@ class CartridgeItem extends CommonDBTM {
/**
* Cron action on cartridges : alert if a stock is behind the threshold
*
* @param CronTask $task for log, display information if NULL? (default NULL)
* @param CronTask $task CronTask for log, display information if NULL? (default NULL)
*
* @return void
**/
......
......@@ -715,7 +715,7 @@ class Certificate extends CommonDBTM {
/**
* Cron action on certificates : alert on expired certificates
*
* @param CronTask $task to log, if NULL display (default NULL)
* @param CronTask $task CronTask to log, if NULL display (default NULL)
*
* @return integer 0 : nothing to do 1 : done with success
**/
......
......@@ -174,9 +174,9 @@ class Certificate_Item extends CommonDBRelation {
*
* @since 9.2
*
* @param $certificate Certificate object
* @param Certificate $certificate Certificate object
*
* @return void (HTML display)
* @return void|boolean (display) Returns false if there is a rights error.
**/
public static function showForCertificate(Certificate $certificate) {
......
......@@ -1318,8 +1318,8 @@ class Change extends CommonITILObject {
*
* Will also display changes of linked items
*
* @param CommonDBTM $item
* @param boolean $withtemplate
* @param CommonDBTM $item
* @param boolean|integer $withtemplate
*
* @return boolean|void
**/
......
......@@ -756,7 +756,7 @@ abstract class CommonDBChild extends CommonDBConnexity {
* @param string $field_name the name of the HTML field inside Item's form
* @param boolean|null $canedit boolean to force rights, NULL to use default behaviour
*
* @return void
* @return void|boolean (display) Returns false if there is a rights error.
**/
static function showChildsForItemForm(CommonDBTM $item, $field_name, $canedit = null) {
global $DB;
......
......@@ -253,8 +253,8 @@ abstract class CommonDBRelation extends CommonDBConnexity {
*
* @since 0.84
*
* @param $item1 object 1
* @param $item2 object 2
* @param CommonDBTM $item1 object 1
* @param CommonDBTM $item2 object 2
*
* @return boolean
**/
......@@ -678,14 +678,14 @@ abstract class CommonDBRelation extends CommonDBConnexity {
*
* @since 0.84
*
* @param $item CommonDBTM object the other item (ie. : $item2)
* @param $case : can be overwrite by object
* - 'add' when this CommonDBRelation is added (to and item)
* - 'update item previous' transfert : this is removed from the old item
* - 'update item next' transfert : this is added to the new item
* - 'delete' when this CommonDBRelation is remove (from an item)
* @param CommonDBTM $item CommonDBTM object the other item (ie. : $item2)
* @param string $case : can be overwrite by object
* - 'add' when this CommonDBRelation is added (to and item)
* - 'update item previous' transfert : this is removed from the old item
* - 'update item next' transfert : this is added to the new item
* - 'delete' when this CommonDBRelation is remove (from an item)
*
* @return (string) the name of the entry for the database (ie. : correctly slashed)
* @return string The name of the entry for the database (ie. : correctly slashed)
**/
function getHistoryNameForItem1(CommonDBTM $item, $case) {
......@@ -968,11 +968,11 @@ abstract class CommonDBRelation extends CommonDBConnexity {
/**
* @since 0.84
*
* @param $itemtype
* @param $base HTMLTableBase object
* @param $super HTMLTableSuperHeader object (default NULL)
* @param $father HTMLTableHeader object (default NULL)
* @param $options array
* @param string $itemtype
* @param HTMLTableBase $base HTMLTableBase object
* @param HTMLTableSuperHeader $super HTMLTableSuperHeader object (default NULL)
* @param HTMLTableHeader $father HTMLTableHeader object (default NULL)
* @param array $options
**/
static function getHTMLTableHeader($itemtype, HTMLTableBase $base,
HTMLTableSuperHeader $super = null,
......@@ -1002,10 +1002,10 @@ abstract class CommonDBRelation extends CommonDBConnexity {
/**
* @since 0.84
*
* @param $row HTMLTableRow object (default NULL)
* @param $item CommonDBTM object (default NULL)
* @param $father HTMLTableCell object (default NULL)
* @param $options array
* @param HTMLTableRow $row HTMLTableRow object (default NULL)
* @param CommonDBTM $item CommonDBTM object (default NULL)
* @param HTMLTableCell $father HTMLTableCell object (default NULL)
* @param array $options
**/
static function getHTMLTableCellsForItem(HTMLTableRow $row = null, CommonDBTM $item = null,
HTMLTableCell $father = null, array $options = []) {
......
......@@ -329,7 +329,7 @@ class CommonDBTM extends CommonGLPI {
*
* @since 9.2
*
* @param Array $crit search criteria
* @param array $crit search criteria
*
* @return boolean|array
*/
......
......@@ -343,8 +343,8 @@ class ComputerAntivirus extends CommonDBChild {
/**
* Print the computers antiviruses
*
* @param $comp Computer object
* @param $withtemplate boolean Template or basic item (default 0)
* @param Computer $comp Computer object
* @param integer $withtemplate Template or basic item (default 0)
*
* @return void
**/
......
......@@ -301,9 +301,9 @@ class ComputerVirtualMachine extends CommonDBChild {
/**
* Print the computers disks
*
* @param $comp Computer object
* @param Computer $comp Computer object
*
* @return void
* @return void|boolean (display) Returns false if there is a rights error.
**/
static function showForComputer(Computer $comp) {
......@@ -464,7 +464,7 @@ class ComputerVirtualMachine extends CommonDBChild {
/**
* Find a virtual machine by uuid
*
* @param fields array of virtualmachine fields
* @param array $fields Array of virtualmachine fields
*
* @return integer|boolean ID of the computer that have this uuid or false otherwise
**/
......
......@@ -3340,7 +3340,7 @@ class Config extends CommonDBTM {
*
* @since 9.3
*
* @return void
* @return void|boolean (display) Returns false if there is a rights error.
*/
function showFormLogs() {
global $CFG_GLPI;
......@@ -3546,7 +3546,7 @@ class Config extends CommonDBTM {
*
* @since 9.5.0
*
* @return void
* @return void|boolean (display) Returns false if there is a rights error.
*/
function showFormSecurity() {
global $CFG_GLPI;
......
......@@ -67,7 +67,8 @@ class CommandLoader implements CommandLoaderInterface {
private $commands = [];
/**
* @param string $rootdir Root directory path of application.
* @param boolean $include_plugins If true, load commands from plugins
* @param string $rootdir Root directory path of application.
*/
public function __construct($include_plugins = true, $rootdir = GLPI_ROOT) {
......@@ -244,7 +245,7 @@ class CommandLoader implements CommandLoaderInterface {
*
* @param SplFileInfo $file File to inspect
* @param string $basedir Directory containing classes (eg GLPI_ROOT . '/inc')
* @param string $prefixes Possible prefixes to add to classname (eg 'PluginExample', 'GlpiPlugin\Example')
* @param array $prefixes Possible prefixes to add to classname (eg 'PluginExample', 'GlpiPlugin\Example')
*
* @return null|string
*/
......
......@@ -316,6 +316,9 @@ abstract class AbstractConfigureCommand extends AbstractCommand implements Force
*
* @param InputInterface $input
* @param OutputInterface $output
* @param string $db_hostport DB host and port
* @param string $db_name DB name
* @param string $db_user DB username
*
* @return boolean
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment