@@ -66,7 +66,7 @@ public static function install(Migration $migration)
6666 $ table = getTableForItemType (__CLASS__ );
6767
6868 if ($ DB ->tableExists ("glpi_plugin_geninventorynumber_fields " )) {
69- //Only migrate itemtypes when it's only necessary, otherwise it breaks upgrade procedure !
69+ //Only migrate itemtypes when it's only necessary, otherwise it breaks upgrade procedure !
7070 $ migration ->renameTable ("glpi_plugin_geninventorynumber_fields " , $ table );
7171 }
7272
@@ -109,7 +109,7 @@ public static function install(Migration $migration)
109109 $ field ->add ($ input );
110110 }
111111
112- // Init date_last_generated
112+ // Init date_last_generated
113113 $ cfield = new self ();
114114 if (
115115 $ cfield ->getFromDBByCrit (['itemtype ' => $ type ])
@@ -121,10 +121,11 @@ public static function install(Migration $migration)
121121 'FROM ' => $ type ::getTable ()
122122 ])->current ()['date ' ];
123123
124- $ DB ->update ($ cfield ::getTable (), [
125- 'id ' => $ cfield ->getID (),
126- 'date_last_generated ' => $ max
127- ]);
124+ $ DB ->update (
125+ $ cfield ::getTable (),
126+ ['date_last_generated ' => $ max ],
127+ ['id ' => $ cfield ->getID ()]
128+ );
128129 }
129130 }
130131 }
@@ -253,11 +254,11 @@ public static function isActiveForItemType($itemtype)
253254 return false ;
254255 }
255256
256- /**
257- * Check if the index needs to be reset based on the configured auto-reset method
258- * @param string $itemtype
259- * @return bool
260- */
257+ /**
258+ * Check if the index needs to be reset based on the configured auto-reset method
259+ * @param string $itemtype
260+ * @return bool
261+ */
261262 public static function needIndexReset ($ itemtype ): bool
262263 {
263264 /** @var DBmysql $DB */
@@ -294,9 +295,9 @@ public static function needIndexReset($itemtype): bool
294295 return false ;
295296 }
296297
297- /**
298- * Reset the index for the given itemtype to 0 and reset the last generated date
299- */
298+ /**
299+ * Reset the index for the given itemtype to 0 and reset the last generated date
300+ */
300301 public static function resetIndex (string $ itemtype ): void
301302 {
302303 /** @var DBmysql $DB */
0 commit comments