@@ -143,7 +143,7 @@ class Inventory
143143 * @param integer $mode One of self::*_MODE
144144 * @param integer $format One of Request::*_MODE
145145 */
146- public function __construct (mixed $ data = null , int $ mode = self ::FULL_MODE , int $ format = Request::JSON_MODE )
146+ public function __construct ($ data = null , $ mode = self ::FULL_MODE , $ format = Request::JSON_MODE )
147147 {
148148 $ this ->mode = $ mode ;
149149 $ this ->conf = new Conf ();
@@ -154,7 +154,12 @@ public function __construct(mixed $data = null, int $mode = self::FULL_MODE, int
154154 }
155155 }
156156
157- public function setMode (int $ mode = self ::FULL_MODE ): Inventory
157+ /**
158+ * @param int $mode
159+ *
160+ * @return Inventory
161+ */
162+ public function setMode ($ mode = self ::FULL_MODE ): Inventory
158163 {
159164 $ this ->mode = $ mode ;
160165 return $ this ;
@@ -168,7 +173,7 @@ public function setMode(int $mode = self::FULL_MODE): Inventory
168173 *
169174 * @return boolean
170175 */
171- public function setData ($ data , int $ format = Request::JSON_MODE ): bool
176+ public function setData ($ data , $ format = Request::JSON_MODE ): bool
172177 {
173178
174179 // Write inventory file
@@ -285,7 +290,7 @@ public function extractMetadata(): array
285290 /**
286291 * CONTACT request from agent
287292 */
288- public function contact (mixed $ data ): void
293+ public function contact ($ data )
289294 {
290295 $ this ->raw_data = $ data ;
291296 $ this ->extractMetadata ();
@@ -301,7 +306,7 @@ public function contact(mixed $data): void
301306 *
302307 * @return bool
303308 */
304- public function doInventory (bool $ test_rules = false ): bool
309+ public function doInventory ($ test_rules = false )
305310 {
306311 global $ DB ;
307312
@@ -572,7 +577,7 @@ public function inError(): bool
572577 return (bool ) count ($ this ->errors );
573578 }
574579
575- public static function getMenuContent (): array | false
580+ public static function getMenuContent ()
576581 {
577582 if (!Session::haveRight (Conf::$ rightname , Conf::IMPORTFROMFILE )) {
578583 return false ;
@@ -659,7 +664,7 @@ public static function getMenuContent(): array|false
659664 *
660665 * @return string
661666 */
662- public function getMainClass (): string
667+ public function getMainClass ()
663668 {
664669 $ class_ns = '\Glpi\Inventory\MainAsset \\' ;
665670 $ main_class = $ class_ns . $ this ->item ::class;
@@ -832,7 +837,7 @@ final public function processInventoryData(): void
832837 *
833838 * @return void
834839 */
835- public function handleItem (): void
840+ public function handleItem ()
836841 {
837842 if ($ this ->mainasset ->checkConf ($ this ->conf )) {
838843 //inject converted assets
@@ -851,7 +856,7 @@ public function handleItem(): void
851856 *
852857 * @return Agent
853858 */
854- public function getAgent (): Agent
859+ public function getAgent ()
855860 {
856861 return $ this ->agent ;
857862 }
@@ -884,7 +889,7 @@ protected function addBench($asset, $type, $start, $extra = null): void
884889 *
885890 * @return void
886891 */
887- public function printBenchResults (): void
892+ public function printBenchResults ()
888893 {
889894 $ output = '' ;
890895 foreach ($ this ->benchs as $ asset => $ types ) {
@@ -941,7 +946,7 @@ public function printBenchResults(): void
941946 }
942947 }
943948
944- public static function getIcon (): string
949+ public static function getIcon ()
945950 {
946951 return "ti ti-cloud-download " ;
947952 }
@@ -951,7 +956,10 @@ public function getMetadata(): array
951956 return $ this ->metadata ;
952957 }
953958
954- public function getAssets (): array
959+ /**
960+ * @return array
961+ */
962+ public function getAssets ()
955963 {
956964 return $ this ->assets ;
957965 }
@@ -966,7 +974,12 @@ public function getItem(): CommonDBTM
966974 return $ this ->item ;
967975 }
968976
969- public static function cronInfo (string $ name ): array
977+ /**
978+ * @param string $name
979+ *
980+ * @return array
981+ */
982+ public static function cronInfo ($ name )
970983 {
971984 switch ($ name ) {
972985 case 'cleantemp ' :
@@ -985,7 +998,7 @@ public static function cronInfo(string $name): array
985998 *
986999 * @return int
9871000 **/
988- public static function cronCleantemp (CronTask $ task ): int
1001+ public static function cronCleantemp ($ task )
9891002 {
9901003 $ conf = new Conf ();
9911004 $ temp_files = glob (GLPI_INVENTORY_DIR . '/*.{ ' . implode (', ' , $ conf ->knownInventoryExtensions ()) . '} ' , GLOB_BRACE );
@@ -1015,7 +1028,7 @@ public static function cronCleantemp(CronTask $task): int
10151028 *
10161029 * @return int
10171030 **/
1018- public static function cronCleanorphans (CronTask $ task ): int
1031+ public static function cronCleanorphans ($ task )
10191032 {
10201033 global $ DB ;
10211034
@@ -1090,7 +1103,7 @@ public static function cronCleanorphans(CronTask $task): int
10901103 return 1 ;
10911104 }
10921105
1093- public static function getTypeName (int $ nb = 0 ): string
1106+ public static function getTypeName ($ nb = 0 )
10941107 {
10951108 return __ ("Inventory " );
10961109 }
0 commit comments