@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public static function getCompareNumber() |
| 59 | 59 | { |
| 60 | - return function ($numA, $numB, $order) { |
|
| 60 | + return function($numA, $numB, $order) { |
|
| 61 | 61 | if (is_numeric($numA) && is_numeric($numB)) { |
| 62 | 62 | $ret = $numA - $numB; |
| 63 | 63 | } else { |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | "I" => 1 |
| 139 | 139 | ]; |
| 140 | 140 | |
| 141 | - if(is_numeric($romanNumber)) { |
|
| 141 | + if (is_numeric($romanNumber)) { |
|
| 142 | 142 | return 0; |
| 143 | 143 | } |
| 144 | 144 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | $sum = 0; |
| 155 | - while($current = current($values)) { |
|
| 155 | + while ($current = current($values)) { |
|
| 156 | 156 | $next = next($values); |
| 157 | 157 | $next > $current ? $sum += $next - $current + 0 * next($values) : $sum += $current; |
| 158 | 158 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | else if (preg_match(Number::PATTERN_ROMAN, $evalValue)) { |
| 57 | 57 | return Number::roman2Dec($evalValue) !== false; |
| 58 | 58 | } |
| 59 | - else if (preg_match(Number::PATTERN_COMMA_AMPERSAND_RANGE, $evalValue)){ |
|
| 59 | + else if (preg_match(Number::PATTERN_COMMA_AMPERSAND_RANGE, $evalValue)) { |
|
| 60 | 60 | return true; |
| 61 | 61 | } |
| 62 | 62 | return false; |
@@ -48,15 +48,12 @@ |
||
| 48 | 48 | { |
| 49 | 49 | if (is_numeric($evalValue)) { |
| 50 | 50 | return true; |
| 51 | - } |
|
| 52 | - else if (preg_match(Number::PATTERN_ORDINAL, $evalValue)) { |
|
| 51 | + } else if (preg_match(Number::PATTERN_ORDINAL, $evalValue)) { |
|
| 53 | 52 | $numberFormatter = new NumberFormatter(CiteProc::getContext()->getLocale()->getLanguage(), NumberFormatter::ORDINAL); |
| 54 | 53 | return $numberFormatter->parse($evalValue) !== false; |
| 55 | - } |
|
| 56 | - else if (preg_match(Number::PATTERN_ROMAN, $evalValue)) { |
|
| 54 | + } else if (preg_match(Number::PATTERN_ROMAN, $evalValue)) { |
|
| 57 | 55 | return Number::roman2Dec($evalValue) !== false; |
| 58 | - } |
|
| 59 | - else if (preg_match(Number::PATTERN_COMMA_AMPERSAND_RANGE, $evalValue)){ |
|
| 56 | + } else if (preg_match(Number::PATTERN_COMMA_AMPERSAND_RANGE, $evalValue)){ |
|
| 60 | 57 | return true; |
| 61 | 58 | } |
| 62 | 59 | return false; |