Skip to content

Commit

Permalink
[ZF2-569][zendframework#2388] CS fixes
Browse files Browse the repository at this point in the history
- trailing whitespace
- break conditional into multiple lines for readability
- whitespace around operators
  • Loading branch information
weierophinney committed Sep 19, 2012
1 parent 1429095 commit 49453f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/Zend/I18n/Validator/Float.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ public function isValid($value)
$valueFiltered = str_replace($groupingSep, '', $value);
$valueFiltered = str_replace($decimalSep, '.', $valueFiltered);

while (strpos($valueFiltered,'.') !== false && (substr($valueFiltered,-1) == '0' || substr($valueFiltered,-1) == '.')) {
$valueFiltered = substr($valueFiltered, 0, strlen($valueFiltered)-1);
while (strpos($valueFiltered, '.') !== false
&& (substr($valueFiltered, -1) == '0' || substr($valueFiltered, -1) == '.')
) {
$valueFiltered = substr($valueFiltered, 0, strlen($valueFiltered) - 1);
}

if (strval($parsedFloat) !== $valueFiltered) {
Expand Down

0 comments on commit 49453f9

Please sign in to comment.