Test Failed
Push — pr/75 ( 080c21 )
by Sebastian
06:11
created
src/Rendering/Name/Name.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         foreach ($node->attributes() as $attribute) {
103 103
             switch ($attribute->getName()) {
104 104
                 case 'form':
105
-                    $this->form = (string)$attribute;
105
+                    $this->form = (string) $attribute;
106 106
                     break;
107 107
             }
108 108
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         cs:names element (taking into account the effects of et-al abbreviation and editor/translator collapsing),
167 167
         which allows for advanced sorting. */
168 168
         if ($this->form == 'count') {
169
-            return (int)count($resultNames);
169
+            return (int) count($resultNames);
170 170
         }
171 171
 
172 172
         return $text;
@@ -270,17 +270,17 @@  discard block
 block discarded – undo
270 270
 
271 271
             switch ($this->delimiterPrecedesEtAl) {
272 272
                 case 'never':
273
-                    $text = $text . " " . $this->etAl;
273
+                    $text = $text." ".$this->etAl;
274 274
                     break;
275 275
                 case 'always':
276
-                    $text = $text . $this->delimiter . $this->etAl;
276
+                    $text = $text.$this->delimiter.$this->etAl;
277 277
                     break;
278 278
                 case 'contextual':
279 279
                 default:
280 280
                     if (count($resultNames) === 1) {
281
-                        $text .= " " . $this->etAl;
281
+                        $text .= " ".$this->etAl;
282 282
                     } else {
283
-                        $text .= $this->delimiter . $this->etAl;
283
+                        $text .= $this->delimiter.$this->etAl;
284 284
                     }
285 285
             }
286 286
         }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                 $text = implode(" ", $resultNames);
466 466
             } else { // >2
467 467
                 $lastName = array_pop($resultNames);
468
-                $text = implode($this->delimiter, $resultNames) . " " . $lastName;
468
+                $text = implode($this->delimiter, $resultNames)." ".$lastName;
469 469
             }
470 470
         }
471 471
         return $text;
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
     {
495 495
         $count = count($resultNames);
496 496
         if (!empty($this->and) && $count > 1 && empty($this->etAl)) {
497
-            $new = $this->and . ' ' . end($resultNames); // add and-prefix of the last name if "and" is defined
497
+            $new = $this->and.' '.end($resultNames); // add and-prefix of the last name if "and" is defined
498 498
             $resultNames[count($resultNames) - 1] = $new; //set prefixed last name at the last position of $resultNames array
499 499
         }
500 500
     }
@@ -541,8 +541,8 @@  discard block
 block discarded – undo
541 541
 
542 542
         if (StringHelper::isLatinString(NameHelper::normalizeName($data)) || StringHelper::isCyrillicString(NameHelper::normalizeName($data))) {
543 543
             if ($this->form === "long" && $nameAsSortOrder &&
544
-                ((string)$demoteNonDroppingParticle === DemoteNonDroppingParticle::NEVER ||
545
-                    (string)$demoteNonDroppingParticle === DemoteNonDroppingParticle::SORT_ONLY)
544
+                ((string) $demoteNonDroppingParticle === DemoteNonDroppingParticle::NEVER ||
545
+                    (string) $demoteNonDroppingParticle === DemoteNonDroppingParticle::SORT_ONLY)
546 546
             ) {
547 547
 
548 548
                 // [La] [Fontaine], [Jean] [de], [III]
@@ -551,11 +551,11 @@  discard block
 block discarded – undo
551 551
 
552 552
                 list($family, $given) = $this->renderNameParts($data);
553 553
 
554
-                $text = $family . (!empty($given) ? $this->sortSeparator . $given : "");
555
-                $text .= !empty($data->suffix) ? $this->sortSeparator . $data->suffix : "";
554
+                $text = $family.(!empty($given) ? $this->sortSeparator.$given : "");
555
+                $text .= !empty($data->suffix) ? $this->sortSeparator.$data->suffix : "";
556 556
             } else if ($this->form === "long" && $nameAsSortOrder &&
557 557
                 (is_null($demoteNonDroppingParticle) ||
558
-                    (string)$demoteNonDroppingParticle === DemoteNonDroppingParticle::DISPLAY_AND_SORT)
558
+                    (string) $demoteNonDroppingParticle === DemoteNonDroppingParticle::DISPLAY_AND_SORT)
559 559
             ) {
560 560
                 // [Fontaine], [Jean] [de] [La], [III]
561 561
 
@@ -563,14 +563,14 @@  discard block
 block discarded – undo
563 563
                 NameHelper::appendParticleTo($data, "given", "non-dropping-particle");
564 564
                 list($family, $given) = $this->renderNameParts($data);
565 565
                 $text = $family;
566
-                $text .= !empty($given) ? $this->sortSeparator . $given : "";
567
-                $text .= !empty($data->suffix) ? $this->sortSeparator . $data->suffix : "";
566
+                $text .= !empty($given) ? $this->sortSeparator.$given : "";
567
+                $text .= !empty($data->suffix) ? $this->sortSeparator.$data->suffix : "";
568 568
 
569 569
             } else if ($this->form === "long" && $nameAsSortOrder && empty($demoteNonDroppingParticle)) {
570 570
                 list($family, $given) = $this->renderNameParts($data);
571 571
                 $text = $family;
572
-                $text .= !empty($given) ? $this->delimiter . $given : "";
573
-                $text .= !empty($data->suffix) ? $this->sortSeparator . $data->suffix : "";
572
+                $text .= !empty($given) ? $this->delimiter.$given : "";
573
+                $text .= !empty($data->suffix) ? $this->sortSeparator.$data->suffix : "";
574 574
             } else if ($this->form === "short") {
575 575
                 // [La] [Fontaine]
576 576
                 NameHelper::prependParticleTo($data, "family", "non-dropping-particle");
@@ -582,12 +582,12 @@  discard block
 block discarded – undo
582 582
                 NameHelper::prependParticleTo($data, "family", "dropping-particle");
583 583
                 NameHelper::appendParticleTo($data, "family", "suffix");
584 584
                 list($family, $given) = $this->renderNameParts($data);
585
-                $text = !empty($given) ? $given . " " . $family : $family;
585
+                $text = !empty($given) ? $given." ".$family : $family;
586 586
             }
587 587
         } else if (StringHelper::isAsianString(NameHelper::normalizeName($data))) {
588 588
             //$text = $this->form === "long" ? $data->family . $data->given : $data->family;
589 589
         } else {
590
-            $text = $this->form === "long" ? $data->family . $data->given : $data->family;
590
+            $text = $this->form === "long" ? $data->family.$data->given : $data->family;
591 591
         }
592 592
         return $text;
593 593
     }
Please login to merge, or discard this patch.