Skip to content

Commit

Permalink
Soem phpstan lvl 2 fixes, won't be enforced
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Nov 10, 2023
1 parent 01be14f commit ef49bde
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 67 deletions.
16 changes: 8 additions & 8 deletions inc/field.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ public static function getFieldName($field, $itemtype, $options, $remove_prefix
*
* Display a dropdown with all available fields for an itemtype
* @since
* @param $name the dropdown name
* @param $itemtype the itemtype
* @param $used an array which contains all fields already added
* @param string $name the dropdown name
* @param string $itemtype the itemtype
* @param array $used an array which contains all fields already added
*
* @return the dropdown random ID
* @return int the dropdown random ID
*/
public static function dropdownFields($name, $itemtype, $used = [])
{
Expand Down Expand Up @@ -377,8 +377,8 @@ public static function displayFieldDefinition($target, $itemtype, $field, $index

/**
* Add a new field in DB
* @param table the table
* @param field the field to delete
* @param string $table the table
* @param string $field the field to delete
* @return void
*/
public static function addNewField($table, $field, $after = false)
Expand Down Expand Up @@ -456,8 +456,8 @@ public static function addNewField($table, $field, $after = false)

/**
* Delete a field in DB
* @param table the table
* @param field the field to delete
* @param string $table the table
* @param string $field the field to delete
* @return void
*/
public static function deleteField($table, $field)
Expand Down
6 changes: 3 additions & 3 deletions inc/object.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ public function cleanDBonPurge()

/**
* Display object preview form
* @param type the object type
* @param PluginGenericobjectType $type the object type
*/
public static function showPrevisualisationForm(PluginGenericobjectType $type)
{
Expand Down Expand Up @@ -1108,8 +1108,8 @@ public function connectedTo()
/**
* Standard method to add an object into glpi
*
* @param values fields to add into glpi
* @param options options used during creation
* @param array $values fields to add into glpi
* @param array $options options used during creation
* @return array
*
**/
Expand Down
13 changes: 7 additions & 6 deletions inc/profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ public function saveProfileToDB($params)

/**
* Create rights for the current profile
* @param profileID the profile ID
* @return void
*/
public static function createFirstAccess()
Expand All @@ -253,9 +252,9 @@ public static function createFirstAccess()

/**
* Check if rights for a profile still exists
* @param profiles_id the profile ID
* @param itemtype name of the type
* @return true if exists, no if not
* @param int $profiles_id the profile ID
* @param string $itemtype name of the type
* @return bool
*/
public static function profileExists($profiles_id, $itemtype = false)
{
Expand All @@ -276,7 +275,9 @@ public static function profileExists($profiles_id, $itemtype = false)

/**
* Create rights for the profile if it doesn't exists
* @param profileID the profile ID
* @param int $profiles_id the profile ID
* @param string $itemtype
* @param bool $first
* @return void
*/
public static function createAccess($profiles_id, $itemtype, $first = false)
Expand Down Expand Up @@ -367,7 +368,7 @@ public static function installRights($first = false)

/**
* Delete type from the rights
* @param name the name of the type
* @param string $itemtype the name of the type
* @return void
*/
public static function deleteTypeFromProfile($itemtype)
Expand Down
Loading

0 comments on commit ef49bde

Please sign in to comment.