Passed
Push — new-api ( 7cf340...18d26d )
by Sebastian
12:35 queued 08:17
created
src/Rendering/Label/Label.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         if ($this->variable === "editortranslator") {
118 118
             if (isset($data->editor) && isset($data->translator)) {
119 119
                 $plural = $this->getPlural($data, $plural, "editortranslator");
120
-                $term = $this->locale->filter('terms', "editortranslator", (string)$form);
120
+                $term = $this->locale->filter('terms', "editortranslator", (string) $form);
121 121
                 $pluralForm = $term->{$plural};
122 122
                 if (!empty($pluralForm)) {
123 123
                     $text = $pluralForm;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             })->current();
131 131
             if (!empty($citationItem->label)) {
132 132
                 $plural = $this->evaluateStringPluralism($citationItem->locator, $citationItem->label);
133
-                $term = $this->locale->filter('terms', $citationItem->label, (string)$form);
133
+                $term = $this->locale->filter('terms', $citationItem->label, (string) $form);
134 134
                 $pluralForm = $term->{$plural} ?? "";
135 135
                 if (!empty($citationItem->locator) && !empty($pluralForm)) {
136 136
                     $text = $pluralForm;
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             foreach ($variables as $variable) {
141 141
                 if (isset($data->{$variable})) {
142 142
                     $plural = $this->getPlural($data, $plural, $variable);
143
-                    $term = $this->locale->filter('terms', $variable, (string)$form);
143
+                    $term = $this->locale->filter('terms', $variable, (string) $form);
144 144
                     $pluralForm = $term->{$plural} ?? "";
145 145
                     if (!empty($data->{$variable}) && !empty($pluralForm)) {
146 146
                         $text = $pluralForm;
Please login to merge, or discard this patch.
src/Rendering/Text/Text.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $lang = (isset($data->language) && $data->language != 'en') ? $data->language : 'en';
137 137
         $this->stylesRenderer->getTextCase()->setLanguage($lang);
138 138
         $renderedText = "";
139
-        switch ((string)$this->renderType) {
139
+        switch ((string) $this->renderType) {
140 140
             case RenderType::VALUE:
141 141
                 $renderedText = $this->stylesRenderer->renderTextCase($this->renderObject);
142 142
                 break;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     private function normalizeDateRange($page): string
226 226
     {
227 227
         if (preg_match("/^(\d+)\s?--?\s?(\d+)$/", trim($page), $matches)) {
228
-            return $matches[1]."-".$matches[2];
228
+            return $matches[1] . "-" . $matches[2];
229 229
         }
230 230
         return $page;
231 231
     }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         }
271 271
         return $this->stylesRenderer->renderTextCase(
272 272
             StringHelper::clearApostrophes(
273
-                htmlspecialchars((string)$value, ENT_HTML5)
273
+                htmlspecialchars((string) $value, ENT_HTML5)
274 274
             )
275 275
         );
276 276
     }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      */
282 282
     private function formatRenderedText($renderedText): string
283 283
     {
284
-        $text = $this->stylesRenderer->renderFormatting((string)$renderedText);
284
+        $text = $this->stylesRenderer->renderFormatting((string) $renderedText);
285 285
         $res = $this->stylesRenderer->renderAffixes($text);
286 286
         $res = $this->stylesRenderer->renderQuotes($res);
287 287
         return $this->stylesRenderer->renderDisplay($res);
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     {
297 297
         $renderedText = $citationNumber + 1;
298 298
         $renderedText = $this->applyAdditionalMarkupFunction($data, $renderedText);
299
-        return (string)$renderedText;
299
+        return (string) $renderedText;
300 300
     }
301 301
 
302 302
     /**
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         $macro = $this->macros->get($this->renderObject);
309 309
         if (is_null($macro)) {
310 310
             try {
311
-                throw new CiteProcException("Macro \"".$this->renderObject."\" does not exist.");
311
+                throw new CiteProcException("Macro \"" . $this->renderObject . "\" does not exist.");
312 312
             } catch (CiteProcException $e) {
313 313
                 $renderedText = "";
314 314
             }
Please login to merge, or discard this patch.