Skip to content

Commit

Permalink
ITST-21347 - Fix various number formatting issues, especially with sc…
Browse files Browse the repository at this point in the history
…ientific notation and fractions - Coding Standards
  • Loading branch information
adirfische committed Oct 20, 2021
1 parent 8e04478 commit 3d7f3e1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/NumberFormatTokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ private function convertFormatSectionToTokens($section_string)
continue;
}

if ( $token->isScientificNotationE()
&& !$token->isQuoted()
&& !$token->isInSquareBrackets()
if ($token->isScientificNotationE()
&& !$token->isQuoted()
&& !$token->isInSquareBrackets()
) {
// This token should be kept seperated from the rest to make formatting easier.
$prevent_merge_of_passed_token = true;
Expand Down Expand Up @@ -449,6 +449,7 @@ private function detectCondition($section_tokens)
}
}
}

return $condition;
}

Expand All @@ -470,6 +471,7 @@ private function detectFormatType($section_tokens)
}
}
}

return null; // Format type uncertain, should probably not be applied.
}

Expand Down Expand Up @@ -510,6 +512,7 @@ private function isDateTimeFormat($section)
}
}
}

return false;
}

Expand All @@ -529,6 +532,7 @@ private function detectIfPercentage($section)
return true;
}
}

return false;
}

Expand Down

0 comments on commit 3d7f3e1

Please sign in to comment.