3535use DateTime ;
3636use Computer as GlpiComputer ;
3737use DbUtils ;
38- use GlpiPlugin \Carbon \Zone ;
3938use GlpiPlugin \Carbon \DataTracking \TrackedFloat ;
4039use GlpiPlugin \Carbon \DataTracking \TrackedInt ;
4140use GlpiPlugin \Carbon \Source_Zone ;
42- use GlpiPlugin \Carbon \Tests \Engine \V1 \EngineTestCase ;
4341
4442/**
4543 * Compute environmental impact of a whole inventory
@@ -56,7 +54,8 @@ class Inventory implements EngineInterface
5654 /**
5755 * Check an item is already in the inventory
5856 *
59- * @param string $itemtype
57+ * @template T of CommonDBTM
58+ * @param class-string<T> $itemtype
6059 * @param integer $items_id
6160 * @return boolean
6261 */
@@ -69,7 +68,8 @@ public function hasItem(string $itemtype, int $items_id)
6968 /**
7069 * Is the itemtype an asset ?
7170 *
72- * @param string $itemtype
71+ * @template T of CommonDBTM
72+ * @param class-string<T> $itemtype
7373 * @return boolean
7474 */
7575 private static function isAsset (string $ itemtype ): bool
@@ -83,7 +83,8 @@ private static function isAsset(string $itemtype): bool
8383 /**
8484 * Add an item to the inventory to be processed
8585 *
86- * @param string $itemtype
86+ * @template T of CommonDBTM
87+ * @param class-string<T> $itemtype
8788 * @param integer $items_id
8889 * @return boolean
8990 */
@@ -125,7 +126,8 @@ public function addItem(string $itemtype, int $items_id): bool
125126 /**
126127 * Add several items to the inventory by itemtype and a search criteria
127128 *
128- * @param string $itemtype itemtype of the items to add
129+ * @template T of CommonDBTM
130+ * @param class-string<T> $itemtype itemtype of the items to add
129131 * @param array $crit search criteria of items to add
130132 * @return boolean true if success
131133 */
0 commit comments