@@ -268,19 +268,10 @@ protected static function getReportCards(): array
268268 'label ' => __ ('Biggest monthly averaged carbon emission per model ' , 'carbon ' ),
269269 'provider ' => Provider::class . '::getSumUsageEmissionsPerModel ' ,
270270 ],
271- 'plugin_carbon_report_usage_adp_impact ' => [
272- 'widgettype ' => ['impact_criteria_number ' ],
273- 'group ' => $ group ,
274- 'label ' => __ ('Usage abiotic depletion potential ' , 'carbon ' ),
275- 'provider ' => Provider::class . '::getImpactOfUsageCriteria ' ,
276- 'args ' => [
277- 'impact_type ' => 'adp ' ,
278- ],
279- ],
280271 ];
281272
282- // Embodied impact
283273 foreach (Type::getImpactTypes () as $ impact_type ) {
274+ // Embodied impact
284275 $ key = "plugin_carbon_report_embodied_ {$ impact_type }_impact " ;
285276 if (isset ($ new_cards [$ key ])) {
286277 trigger_error ("The card $ key already exists " , E_USER_WARNING );
@@ -294,6 +285,21 @@ protected static function getReportCards(): array
294285 'impact_type ' => $ impact_type ,
295286 ],
296287 ];
288+
289+ // Usage impact
290+ $ key = "plugin_carbon_report_usage_ {$ impact_type }_impact " ;
291+ if (isset ($ new_cards [$ key ])) {
292+ trigger_error ("The card $ key already exists " , E_USER_WARNING );
293+ }
294+ $ new_cards [$ key ] = [
295+ 'widgettype ' => ['impact_criteria_number ' ],
296+ 'group ' => $ group ,
297+ 'label ' => Type::getUsageImpactLabel ($ impact_type ),
298+ 'provider ' => Provider::class . '::getImpactOfUsageCriteria ' ,
299+ 'args ' => [
300+ 'impact_type ' => $ impact_type ,
301+ ],
302+ ];
297303 }
298304
299305 // Informational content
0 commit comments