Completed
Push — version2.0 ( af5a57...2f739c )
by Sebastian
06:52
created
src/Seboettg/CiteProc/Style/Sort/Key.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         foreach ($node->attributes() as $attribute) {
57 57
             $name = $attribute->getName();
58 58
             if ($name === "variable") {
59
-                $this->variable = (string)$attribute;
59
+                $this->variable = (string) $attribute;
60 60
             }
61 61
             if ($name === "sort") {
62 62
                 $this->sort = (string) $attribute;
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Style/Sort/Sort.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function sort(&$data)
52 52
     {
53 53
         //begin with last sort key
54
-        for ($i = $this->sortingKeys->count()-1; $i >= 0; --$i) {
54
+        for ($i = $this->sortingKeys->count() - 1; $i >= 0; --$i) {
55 55
             /** @var Key $key */
56 56
             $key = $this->sortingKeys->get($i);
57 57
             $variable = $key->getVariable();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
              */
67 67
             if ($key->isNameVariable()) {
68 68
 
69
-                usort($data, function ($a, $b) use ($variable, $order) {
69
+                usort($data, function($a, $b) use ($variable, $order) {
70 70
                     /**
71 71
                      * @param $a
72 72
                      * @param $key
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
              * If the original variable value only consists of non-numeric text, the value is returned as a text string.
87 87
              */
88 88
             if ($key->isNumberVariable()) {
89
-                usort($data,function ($a, $b) use ($variable, $order) {
89
+                usort($data, function($a, $b) use ($variable, $order) {
90 90
                     $numA = $a->{$variable};
91 91
                     $numB = $b->{$variable};
92 92
                     $compareNumber = Number::getCompareNumber();
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
              * chronological order of the seasons differs between the northern and southern hemispheres.
102 102
              */
103 103
             if ($key->isDateVariable()) {
104
-                usort($data,function ($a, $b) use ($variable, $order) {
104
+                usort($data, function($a, $b) use ($variable, $order) {
105 105
                     $numA = Date::serializeDate($a->{$variable});
106 106
                     $numB = Date::serializeDate($b->{$variable});
107 107
                     $compareNumber = Number::getCompareNumber();
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Style/StyleElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                  * formatting attributes.
45 45
                  */
46 46
                 case 'layout':
47
-                    $this->layout   =   new Layout($child);
47
+                    $this->layout = new Layout($child);
48 48
                     break;
49 49
 
50 50
                 /* cs:citation and cs:bibliography may include a cs:sort child element before the cs:layout element to
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Locale/Term.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
     {
31 31
         $nameParts = explode("-", $name);
32 32
         $attr = "";
33
-        for ($i = count($nameParts)-1; $i >= 0; --$i) {
33
+        for ($i = count($nameParts) - 1; $i >= 0; --$i) {
34 34
             if ($i > 0) {
35 35
                 $attr = ucfirst($nameParts[$i]) . $attr;
36 36
             } else {
37
-                $attr = $nameParts[$i].$attr;
37
+                $attr = $nameParts[$i] . $attr;
38 38
             }
39 39
         }
40 40
         if (!isset($this->{$attr})) {
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Locale/LocaleXmlParserTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     private function parseXml(\SimpleXMLElement $locale)
53 53
     {
54 54
         foreach ($locale as $node) {
55
-            switch($node->getName()) {
55
+            switch ($node->getName()) {
56 56
                 case 'style-options':
57 57
                     $this->optionsXml->add('options', $node);
58 58
                     foreach ($node->attributes() as $name => $value) {
Please login to merge, or discard this patch.
vendorPath.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,19 +29,19 @@
 block discarded – undo
29 29
 
30 30
 if (!function_exists('vendorPath')) {
31 31
 
32
-	/**
33
-	 * @return bool|string returns path of composer vendor folder, and false if folder does not exist
34
-	 */
35
-	function vendorPath() {
32
+    /**
33
+     * @return bool|string returns path of composer vendor folder, and false if folder does not exist
34
+     */
35
+    function vendorPath() {
36 36
 
37
-		if (file_exists(__DIR__ . '/vendor/')) {
38
-			return __DIR__ . '/vendor';
39
-		} else {
40
-			if (!file_exists(__DIR__ . '/../../')) {
41
-				return false;
42
-			} else {
43
-				return __DIR__ . '/../..';
44
-			}
45
-		}
46
-	}
37
+        if (file_exists(__DIR__ . '/vendor/')) {
38
+            return __DIR__ . '/vendor';
39
+        } else {
40
+            if (!file_exists(__DIR__ . '/../../')) {
41
+                return false;
42
+            } else {
43
+                return __DIR__ . '/../..';
44
+            }
45
+        }
46
+    }
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
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.
src/Seboettg/CiteProc/Styles/DelimiterTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
         /** @var \SimpleXMLElement $attribute */
19 19
         foreach ($node->attributes() as $attribute) {
20 20
             /** @var string $name */
21
-            $name = (string)$attribute->getName();
22
-            $value = (string)$attribute;
21
+            $name = (string) $attribute->getName();
22
+            $value = (string) $attribute;
23 23
 
24 24
             switch ($name) {
25 25
                 case 'prefix':
Please login to merge, or discard this patch.