Passed
Push — new-api ( 220eb6...4bfe18 )
by Sebastian
06:58
created
src/Style/Options/NameOptions.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -199,49 +199,49 @@
 block discarded – undo
199 199
             if (!empty($attribute)) {
200 200
                 switch ($nameAttribute) {
201 201
                     case 'and':
202
-                        $nameOptions->setAnd((string)$attribute);
202
+                        $nameOptions->setAnd((string) $attribute);
203 203
                         break;
204 204
                     case 'delimiter-precedes-et-al':
205
-                        $nameOptions->setDelimiterPrecedesEtAl((string)$attribute);
205
+                        $nameOptions->setDelimiterPrecedesEtAl((string) $attribute);
206 206
                         break;
207 207
                     case 'delimiter-precedes-last':
208
-                        $nameOptions->setDelimiterPrecedesLast((string)$attribute);
208
+                        $nameOptions->setDelimiterPrecedesLast((string) $attribute);
209 209
                         break;
210 210
                     case 'et-al-min':
211
-                        $nameOptions->setEtAlMin(intval((string)$attribute));
211
+                        $nameOptions->setEtAlMin(intval((string) $attribute));
212 212
                         break;
213 213
                     case 'et-al-use-first':
214
-                        $nameOptions->setEtAlUseFirst(intval((string)$attribute));
214
+                        $nameOptions->setEtAlUseFirst(intval((string) $attribute));
215 215
                         break;
216 216
                     case 'et-al-subsequent-min':
217
-                        $nameOptions->setEtAlSubsequentMin(intval((string)$attribute));
217
+                        $nameOptions->setEtAlSubsequentMin(intval((string) $attribute));
218 218
                         break;
219 219
                     case 'et-al-subsequent-use-first':
220
-                        $nameOptions->setEtAlSubsequentUseFirst(intval((string)$attribute));
220
+                        $nameOptions->setEtAlSubsequentUseFirst(intval((string) $attribute));
221 221
                         break;
222 222
                     case 'et-al-use-last':
223
-                        $nameOptions->setEtAlUseLast(boolval((string)$attribute));
223
+                        $nameOptions->setEtAlUseLast(boolval((string) $attribute));
224 224
                         break;
225 225
                     case 'initialize':
226
-                        $nameOptions->setInitialize(boolval((string)$attribute));
226
+                        $nameOptions->setInitialize(boolval((string) $attribute));
227 227
                         break;
228 228
                     case 'initialize-with':
229
-                        $nameOptions->setInitializeWith((string)$attribute);
229
+                        $nameOptions->setInitializeWith((string) $attribute);
230 230
                         break;
231 231
                     case 'name-as-sort-order':
232
-                        $nameOptions->setNameAsSortOrder((string)$attribute);
232
+                        $nameOptions->setNameAsSortOrder((string) $attribute);
233 233
                         break;
234 234
                     case 'sort-separator':
235
-                        $nameOptions->setSortSeparator((string)$attribute);
235
+                        $nameOptions->setSortSeparator((string) $attribute);
236 236
                         break;
237 237
                     case 'name-form':
238
-                        $nameOptions->setNameForm((string)$attribute);
238
+                        $nameOptions->setNameForm((string) $attribute);
239 239
                         break;
240 240
                     case 'form':
241
-                        $nameOptions->setForm((string)$attribute);
241
+                        $nameOptions->setForm((string) $attribute);
242 242
                         break;
243 243
                     case 'name-delimiter':
244
-                        $nameOptions->setNameDelimiter((string)$attribute);
244
+                        $nameOptions->setNameDelimiter((string) $attribute);
245 245
                         break;
246 246
                 }
247 247
             }
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
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $lang = (isset($data->language) && $data->language != 'en') ? $data->language : 'en';
139 139
         $this->stylesRenderer->getTextCase()->setLanguage($lang);
140 140
         $renderedText = "";
141
-        switch ((string)$this->renderType) {
141
+        switch ((string) $this->renderType) {
142 142
             case RenderType::VALUE:
143 143
                 $renderedText = $this->stylesRenderer->renderTextCase($this->renderObject);
144 144
                 break;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     private function normalizeDateRange($page): string
228 228
     {
229 229
         if (preg_match("/^(\d+)\s?--?\s?(\d+)$/", trim($page), $matches)) {
230
-            return $matches[1]."-".$matches[2];
230
+            return $matches[1] . "-" . $matches[2];
231 231
         }
232 232
         return $page;
233 233
     }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         }
273 273
         return $this->stylesRenderer->renderTextCase(
274 274
             StringHelper::clearApostrophes(
275
-                htmlspecialchars((string)$value, ENT_HTML5)
275
+                htmlspecialchars((string) $value, ENT_HTML5)
276 276
             )
277 277
         );
278 278
     }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      */
284 284
     private function formatRenderedText($renderedText): string
285 285
     {
286
-        $text = $this->stylesRenderer->renderFormatting((string)$renderedText);
286
+        $text = $this->stylesRenderer->renderFormatting((string) $renderedText);
287 287
         $res = $this->stylesRenderer->renderAffixes($text);
288 288
         if (!empty($res)) {
289 289
             $res = $this->removeConsecutiveChars($res);
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     {
302 302
         $renderedText = $citationNumber + 1;
303 303
         $renderedText = $this->applyAdditionalMarkupFunction($data, $renderedText);
304
-        return (string)$renderedText;
304
+        return (string) $renderedText;
305 305
     }
306 306
 
307 307
     /**
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         $macro = $this->macros->get($this->renderObject);
314 314
         if (is_null($macro)) {
315 315
             try {
316
-                throw new CiteProcException("Macro \"".$this->renderObject."\" does not exist.");
316
+                throw new CiteProcException("Macro \"" . $this->renderObject . "\" does not exist.");
317 317
             } catch (CiteProcException $e) {
318 318
                 $renderedText = "";
319 319
             }
Please login to merge, or discard this patch.