Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis committed Aug 3, 2020
1 parent a8b3195 commit b7936b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Converters/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public static function convert(
*/
public static function convertMetric(string $sourceCode, string $sourceFormat): string
{
$sourceCode = trim($sourceCode);
if ('' === $sourceCode) {
return '';
}

$tcStatsConverter = Map::getMetric($sourceFormat);

return $tcStatsConverter->fromInternalMetric($tcStatsConverter->toInternalMetric($sourceCode));
Expand Down

0 comments on commit b7936b9

Please sign in to comment.