Skip to content

Commit f0eeb3e

Browse files
committed
fix(Type): search option construction
1 parent 2c0f57f commit f0eeb3e

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/EmbodiedImpact.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ public function rawSearchOptions()
8585
];
8686

8787
$id = 5;
88-
foreach (Type::getImpactTypes() as $type => $unit) {
88+
foreach (Type::getImpactTypes() as $type) {
8989
$tab[] = [
9090
'id' => $id,
9191
'table' => $this->getTable(),
9292
'field' => $type,
9393
'name' => Type::getEmbodiedImpactLabel($type),
9494
'massiveaction' => false,
9595
'datatype' => 'number',
96-
'unit' => implode(' ', $unit),
96+
'unit' => implode(' ', Type::getImpactUnit($type)),
9797
];
9898
$id++;
9999
}

src/Impact/Type.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
class Type
3737
{
38-
const IMPACT_GWP = 0; // Global warming potential
39-
const IMPACT_ADP = 1; // Abiotic Depletion Potential
38+
const IMPACT_GWP = 1; // Global warming potential
39+
const IMPACT_ADP = 2; // Abiotic Depletion Potential
4040
const IMPACT_PE = 3; // Primary Energy
4141
const IMPACT_GWPPB = 4;
4242
const IMPACT_GWPPF = 5;
@@ -114,7 +114,7 @@ class Type
114114
];
115115

116116
/**
117-
* Undocumented function
117+
* get an array of impact types
118118
*
119119
* @return array<string, array>
120120
*/

0 commit comments

Comments
 (0)