Passed
Push — new-api ( c5b007...275856 )
by Sebastian
03:44
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/Rendering/Date/Date.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         foreach ($node->children() as $child) {
97 97
             if ($child->getName() === "date-part") {
98 98
                 $datePartName = (string) $child->attributes()["name"];
99
-                $this->dateParts->set($this->form."-".$datePartName, Util\Factory::create($child));
99
+                $this->dateParts->set($this->form . "-" . $datePartName, Util\Factory::create($child));
100 100
             }
101 101
         }
102 102
 
@@ -173,15 +173,15 @@  discard block
 block discarded – undo
173 173
                 $toRender = 0;
174 174
                 if ($interval->y > 0 && in_array('year', $dateParts)) {
175 175
                     $toRender |= self::DATE_RANGE_STATE_YEAR;
176
-                    $delimiter = $this->dateParts->get($this->form."-year")->getRangeDelimiter();
176
+                    $delimiter = $this->dateParts->get($this->form . "-year")->getRangeDelimiter();
177 177
                 }
178 178
                 if ($interval->m > 0 && $from->getMonth() - $to->getMonth() !== 0 && in_array('month', $dateParts)) {
179 179
                     $toRender |= self::DATE_RANGE_STATE_MONTH;
180
-                    $delimiter = $this->dateParts->get($this->form."-month")->getRangeDelimiter();
180
+                    $delimiter = $this->dateParts->get($this->form . "-month")->getRangeDelimiter();
181 181
                 }
182 182
                 if ($interval->d > 0 && $from->getDay() - $to->getDay() !== 0 && in_array('day', $dateParts)) {
183 183
                     $toRender |= self::DATE_RANGE_STATE_DAY;
184
-                    $delimiter = $this->dateParts->get($this->form."-day")->getRangeDelimiter();
184
+                    $delimiter = $this->dateParts->get($this->form . "-day")->getRangeDelimiter();
185 185
                 }
186 186
                 if ($toRender === self::DATE_RANGE_STATE_NONE) {
187 187
                     $ret .= $this->iterateAndRenderDateParts($dateParts, $data_);
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             }
192 192
 
193 193
             if (isset($var->raw) && preg_match("/(\p{L}+)\s?([\-\–&,])\s?(\p{L}+)/u", $var->raw, $matches)) {
194
-                return $matches[1].$matches[2].$matches[3];
194
+                return $matches[1] . $matches[2] . $matches[3];
195 195
             }
196 196
         } elseif (!empty($this->datePartsAttribute)) {
197 197
             // fallback:
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                     $this->dateParts->add(
350 350
                         "$form-$datePart",
351 351
                         new DatePart(
352
-                            new SimpleXMLElement('<date-part name="'.$datePart.'" form="'.$form.'" />')
352
+                            new SimpleXMLElement('<date-part name="' . $datePart . '" form="' . $form . '" />')
353 353
                         )
354 354
                     );
355 355
                 }
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/Layout.php 1 patch
Spacing   +4 added lines, -5 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?
@@ -146,7 +145,7 @@  discard block
 block discarded – undo
146 145
         if (!empty($inMargin) && !empty($margin) && CiteProc::getContext()->isModeBibliography()) {
147 146
             $leftMargin = $this->removeConsecutiveChars($this->htmlentities($this->format(implode("", $inMargin))));
148 147
             $rightInline = $this->removeConsecutiveChars(
149
-                $this->htmlentities($this->format(implode("", $margin))).
148
+                $this->htmlentities($this->format(implode("", $margin))) .
150 149
                 $this->suffix
151 150
             );
152 151
             $res  = '<div class="csl-left-margin">' . trim($leftMargin) . '</div>';
@@ -175,7 +174,7 @@  discard block
 block discarded – undo
175 174
     private function wrapBibEntry($dataItem, $value)
176 175
     {
177 176
         $value = $this->addAffixes($value);
178
-        return "\n  ".
177
+        return "\n  " .
179 178
             "<div class=\"csl-entry\">" .
180 179
             $renderedItem = CiteProcHelper::applyAdditionMarkupFunction($dataItem, "csl-entry", $value) .
181 180
             "</div>";
Please login to merge, or discard this patch.