Passed
Push — new-api ( f133eb...5677f6 )
by Sebastian
04:24
created
src/Rendering/Name/Names.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 } else {
184 184
                     $arr = [];
185 185
                     foreach ($data->editor as $editor) {
186
-                        $edt = $this->format($editor->family.", ".$editor->given);
186
+                        $edt = $this->format($editor->family . ", " . $editor->given);
187 187
                         $results[] = NameHelper::addExtendedMarkup('editor', $editor, $edt);
188 188
                     }
189 189
                     $str .= implode($this->delimiter, $arr);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                     }
218 218
                 } else {
219 219
                     foreach ($data->{$var} as $name) {
220
-                        $formatted = $this->format($name->given." ".$name->family);
220
+                        $formatted = $this->format($name->given . " " . $name->family);
221 221
                         $results[] = NameHelper::addExtendedMarkup($var, $name, $formatted);
222 222
                     }
223 223
                 }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     {
248 248
         $this->label->setVariable($var);
249 249
         if (in_array($this->label->getForm(), ["verb", "verb-short"])) {
250
-            $name = $this->label->render($data).$name;
250
+            $name = $this->label->render($data) . $name;
251 251
         } else {
252 252
             $name .= $this->label->render($data);
253 253
         }
Please login to merge, or discard this patch.
src/Util/NameHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public static function appendParticleTo(&$data, $namePart, $particle)
71 71
     {
72 72
         if (isset($data->{$particle}) && isset($data->{$namePart})) {
73
-            $data->{$namePart} = $data->{$namePart}." ".$data->{$particle}; // append $particle to $namePart
73
+            $data->{$namePart} = $data->{$namePart} . " " . $data->{$particle}; // append $particle to $namePart
74 74
             unset($data->{$particle}); //remove particle from $data
75 75
         }
76 76
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public static function prependParticleTo(&$data, $namePart, $particle)
85 85
     {
86 86
         if (isset($data->{$particle}) && isset($data->{$namePart})) {
87
-            $data->{$namePart} = $data->{$particle}." ".$data->{$namePart}; //prepend $particle to $namePart
87
+            $data->{$namePart} = $data->{$particle} . " " . $data->{$namePart}; //prepend $particle to $namePart
88 88
             unset($data->{$particle}); //remove particle from $data
89 89
         }
90 90
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         if (empty($data->family)) {
122 122
             throw new CiteProcException("Illegal argument. Name has no family name.");
123 123
         }
124
-        return $data->family.(isset($data->given) ? $data->given : "");
124
+        return $data->family . (isset($data->given) ? $data->given : "");
125 125
     }
126 126
 
127 127
     public static function addExtendedMarkup($nameVar, $nameItem, $formattedName)
Please login to merge, or discard this patch.
src/Locale/Locale.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@
 block discarded – undo
53 53
      */
54 54
     public function __construct(Config\Locale $localeConfig, $xmlString = null)
55 55
     {
56
-        $this->language = (string)$localeConfig;
56
+        $this->language = (string) $localeConfig;
57 57
 
58 58
         if (!empty($xmlString)) {
59 59
             $this->localeXml = new SimpleXMLElement($xmlString);
60 60
         } else {
61
-            $this->localeXml = new SimpleXMLElement(loadLocales((string)$localeConfig));
61
+            $this->localeXml = new SimpleXMLElement(loadLocales((string) $localeConfig));
62 62
         }
63 63
 
64 64
         $this->initLocaleXmlParser();
Please login to merge, or discard this patch.
src/Styles/StylesRenderer.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
                     $textCase = new TextCase((string) $attribute);
45 45
                     break;
46 46
                 case 'display':
47
-                    $display = new Display((string )$attribute);
47
+                    $display = new Display((string) $attribute);
48 48
                     break;
49 49
                 case 'quotes':
50 50
                     $quotes = "true" === (string) $attribute;
Please login to merge, or discard this patch.
src/Util/StringHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public static function capitalizeForTitle($titleString)
93 93
     {
94 94
         if (preg_match('/(.+[^\<\>][\.:\/;\?\!]\s?)([a-z])(.+)/', $titleString, $match)) {
95
-            $titleString = $match[1].StringHelper::mb_ucfirst($match[2]).$match[3];
95
+            $titleString = $match[1] . StringHelper::mb_ucfirst($match[2]) . $match[3];
96 96
         }
97 97
 
98 98
         $wordArray = explode(" ", $titleString);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         /** @noinspection PhpInternalEntityUsedInspection */
141 141
         $encoding = Mbstring::mb_detect_encoding($firstChar, self::ISO_ENCODINGS, true);
142 142
         return in_array($encoding, self::ISO_ENCODINGS) ?
143
-            Mbstring::mb_strtoupper($firstChar, $encoding).$then : $firstChar.$then;
143
+            Mbstring::mb_strtoupper($firstChar, $encoding) . $then : $firstChar . $then;
144 144
     }
145 145
     // phpcs:disable
146 146
     public static function mb_strrev($string)
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
             foreach ($spaceExploded as $givenPart) {
190 190
                 $firstLetter = mb_substr($givenPart, 0, 1, "UTF-8");
191 191
                 if (StringHelper::isLatinString($firstLetter)) {
192
-                    $res .= ctype_upper($firstLetter) ? $firstLetter.$initializeSign : " ".$givenPart." ";
192
+                    $res .= ctype_upper($firstLetter) ? $firstLetter . $initializeSign : " " . $givenPart . " ";
193 193
                 } else {
194
-                    $res .= $firstLetter.$initializeSign;
194
+                    $res .= $firstLetter . $initializeSign;
195 195
                 }
196 196
             }
197 197
             if ($i < count($exploded) - 1 && $initializeWithHyphen) {
198
-                $res = rtrim($res)."-";
198
+                $res = rtrim($res) . "-";
199 199
             }
200 200
             ++$i;
201 201
         }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $innerCloseQuote
259 259
     ) {
260 260
         if (preg_match("/(.*)$outerOpenQuote(.+)$outerCloseQuote(.*)/u", $text, $match)) {
261
-            return $match[1].$innerOpenQuote.$match[2].$innerCloseQuote.$match[3];
261
+            return $match[1] . $innerOpenQuote . $match[2] . $innerCloseQuote . $match[3];
262 262
         }
263 263
         return $text;
264 264
     }
Please login to merge, or discard this patch.
src/Rendering/Date/Date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -182,15 +182,15 @@  discard block
 block discarded – undo
182 182
                 $toRender = 0;
183 183
                 if ($interval->y > 0 && in_array('year', $dateParts)) {
184 184
                     $toRender |= self::DATE_RANGE_STATE_YEAR;
185
-                    $delimiter = $this->dateParts->get($this->form."-year")->getRangeDelimiter();
185
+                    $delimiter = $this->dateParts->get($this->form . "-year")->getRangeDelimiter();
186 186
                 }
187 187
                 if ($interval->m > 0 && $from->getMonth() - $to->getMonth() !== 0 && in_array('month', $dateParts)) {
188 188
                     $toRender |= self::DATE_RANGE_STATE_MONTH;
189
-                    $delimiter = $this->dateParts->get($this->form."-month")->getRangeDelimiter();
189
+                    $delimiter = $this->dateParts->get($this->form . "-month")->getRangeDelimiter();
190 190
                 }
191 191
                 if ($interval->d > 0 && $from->getDay() - $to->getDay() !== 0 && in_array('day', $dateParts)) {
192 192
                     $toRender |= self::DATE_RANGE_STATE_DAY;
193
-                    $delimiter = $this->dateParts->get($this->form."-day")->getRangeDelimiter();
193
+                    $delimiter = $this->dateParts->get($this->form . "-day")->getRangeDelimiter();
194 194
                 }
195 195
                 if ($toRender === self::DATE_RANGE_STATE_NONE) {
196 196
                     $ret .= $this->iterateAndRenderDateParts($dateParts, $data_);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
             }
201 201
 
202 202
             if (isset($var->raw) && preg_match("/(\p{L}+)\s?([\-\–&,])\s?(\p{L}+)/u", $var->raw, $matches)) {
203
-                return $matches[1].$matches[2].$matches[3];
203
+                return $matches[1] . $matches[2] . $matches[3];
204 204
             }
205 205
         } elseif (!empty($this->datePartsAttribute)) {
206 206
             // fallback:
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
                     $this->dateParts->add(
359 359
                         "$form-$datePart",
360 360
                         new DatePart(
361
-                            new SimpleXMLElement('<date-part name="'.$datePart.'" form="'.$form.'" />')
361
+                            new SimpleXMLElement('<date-part name="' . $datePart . '" form="' . $form . '" />')
362 362
                         )
363 363
                     );
364 364
                 }
Please login to merge, or discard this patch.
src/Rendering/Layout.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,15 +91,14 @@  discard block
 block discarded – undo
91 91
         }
92 92
 
93 93
         if (CiteProc::getContext()->isModeBibliography()) {
94
-            foreach ($data as $citationNumber => $item) {
95
-                ++self::$numberOfCitedItems;
94
+            foreach ($data as $citationNumber => $item) {++self::$numberOfCitedItems;
96 95
                 CiteProc::getContext()->getResults()->append(
97 96
                     $this->wrapBibEntry($item, $this->renderSingle($item, $citationNumber))
98 97
                 );
99 98
             }
100 99
             $ret .= implode($this->delimiter, CiteProc::getContext()->getResults()->toArray());
101 100
             $ret = StringHelper::clearApostrophes($ret);
102
-            return "<div class=\"csl-bib-body\">".$ret."\n</div>";
101
+            return "<div class=\"csl-bib-body\">" . $ret . "\n</div>";
103 102
         } elseif (CiteProc::getContext()->isModeCitation()) {
104 103
             if ($citationItems->count() > 0) { //is there a filter for specific citations?
105 104
                 if ($this->isGroupedCitations($citationItems)) { //if citation items grouped?
@@ -174,7 +173,7 @@  discard block
 block discarded – undo
174 173
     private function wrapBibEntry($dataItem, $value)
175 174
     {
176 175
         $value = $this->addAffixes($value);
177
-        return "\n  ".
176
+        return "\n  " .
178 177
             "<div class=\"csl-entry\">" .
179 178
             $renderedItem = CiteProcHelper::applyAdditionMarkupFunction($dataItem, "csl-entry", $value) .
180 179
             "</div>";
Please login to merge, or discard this patch.
src/Rendering/Group.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         $stylesRenderer = StylesRenderer::factory($node);
69 69
         $group->setChildren($children);
70 70
         $group->setStylesRenderer($stylesRenderer);
71
-        $group->setDelimiter((string)$node->attributes()['delimiter']);
71
+        $group->setDelimiter((string) $node->attributes()['delimiter']);
72 72
         return $group;
73 73
     }
74 74
 
Please login to merge, or discard this patch.