Completed
Push — master ( 888d29...e13826 )
by Sebastian
06:20
created
src/Seboettg/CiteProc/Rendering/Layout.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
         if (CiteProc::getContext()->isModeBibliography()) {
55 55
             if (is_array($data)) {
56 56
                 $arr = [];
57
-                foreach ($data as $item) {
58
-                    ++self::$numberOfCitedItems;
57
+                foreach ($data as $item) {++self::$numberOfCitedItems;
59 58
                     $arr[] = $this->wrapBibEntry($this->renderSingle($item));
60 59
                 }
61 60
                 $ret .= implode($this->delimiter, $arr);
@@ -63,7 +62,7 @@  discard block
 block discarded – undo
63 62
                 $ret .= $this->wrapBibEntry($this->renderSingle($data));
64 63
             }
65 64
 
66
-            return "<div class=\"csl-bib-body\">".$ret."\n</div>";
65
+            return "<div class=\"csl-bib-body\">" . $ret . "\n</div>";
67 66
 
68 67
         } else if (CiteProc::getContext()->isModeCitation()) {
69 68
             if (is_array($data)) {
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Util/StringHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $wordArray = explode(" ", $text);
65 65
 
66
-        array_walk($wordArray, function (&$word) {
66
+        array_walk($wordArray, function(&$word) {
67 67
             $word = ucfirst($word);
68 68
         });
69 69
 
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
     public static function capitalizeForTitle($titleString)
74 74
     {
75 75
         if (preg_match('/(.+[^\<\>][\.:\/;\?\!]\s?)([a-z])(.+)/', $titleString, $match)) {
76
-            $titleString = $match[1].StringHelper::mb_ucfirst($match[2]).$match[3];
76
+            $titleString = $match[1] . StringHelper::mb_ucfirst($match[2]) . $match[3];
77 77
         }
78 78
 
79 79
         $wordArray = explode(" ", $titleString);
80 80
 
81
-        array_walk($wordArray, function (&$word) {
81
+        array_walk($wordArray, function(&$word) {
82 82
 
83 83
             $words = explode("-", $word);
84 84
             if (count($words) > 1) {
85
-                array_walk($words, function (&$w) {
85
+                array_walk($words, function(&$w) {
86 86
                     $w = StringHelper::keepLowerCase($w) ? $w : StringHelper::mb_ucfirst($w);
87 87
                 });
88 88
                 $word = implode("-", $words);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public static function keepLowerCase($word)
97 97
     {
98
-        $lowerCase =  in_array($word, self::PREPOSITIONS) ||
98
+        $lowerCase = in_array($word, self::PREPOSITIONS) ||
99 99
                       in_array($word, self::ARTICLES) ||
100 100
                       in_array($word, self::CONJUNCTIONS) ||
101 101
                       in_array($word, self::ADJECTIVES);
@@ -110,6 +110,6 @@  discard block
 block discarded – undo
110 110
         $then = mb_substr($string, 1, $strlen - 1, $encoding);
111 111
         $encodings = ['ISO-8859-7'];
112 112
         $encoding = mb_detect_encoding($firstChar, $encodings, true);
113
-        return in_array($encoding, $encodings) ? $firstChar.$then : mb_strtoupper($firstChar, $encoding) . $then;
113
+        return in_array($encoding, $encodings) ? $firstChar . $then : mb_strtoupper($firstChar, $encoding) . $then;
114 114
     }
115 115
 }
116 116
\ No newline at end of file
Please login to merge, or discard this patch.