Completed
Push — master ( e87eab...888d29 )
by Sebastian
03:03
created
src/Seboettg/CiteProc/Util/Number.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Constraint/IsNumeric.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,15 +48,12 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.