Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions src/Impact/Usage/Boavizta/AbstractAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,47 +140,6 @@ protected function query($description): array
return $response;
}

// /**
// * Read the response to find the impacts provided by Boaviztapi
// *
// * @return array
// */
// protected function parseResponse(array $response): array
// {
// $impacts = [];
// $types = Type::getImpactTypes();
// foreach ($response['impacts'] as $type => $impact) {
// if (!in_array($type, $types)) {
// trigger_error(sprintf('Unsupported impact type %s in class %s', $type, __CLASS__));
// continue;
// }
// $impact_id = Type::getImpactId($type);
// if ($impact_id === false) {
// continue;
// }
// $impacts[$impact_id] = $this->parseCriteria($type, $response['impacts'][$type]);

// }

// return $impacts;
// }

// protected function parseCriteria(string $name, array $impact): ?TrackedFloat
// {
// if ($impact['embedded'] === 'not implemented') {
// return null;
// }

// $unit_multiplier = $this->client->getCriteriaUnits()[$name];
// $value = new TrackedFloat(
// $impact['embedded']['value'] * $unit_multiplier,
// null,
// TrackedFloat::DATA_QUALITY_ESTIMATED
// );

// return $value;
// }

public function getEvaluableQuery(string $itemtype, array $crit = [], bool $entity_restrict = true): array
{
$item_table = getTableForItemType($itemtype);
Expand Down