@@ -76,7 +76,7 @@ |
||
76 | 76 | { |
77 | 77 | if (isset($data->{$particle}) && isset($data->{$namePart})) { |
78 | 78 | $data->{$namePart} = $data->{$particle} . " " . $data->{$namePart}; //prepend $particle to $namePart |
79 | - unset($data->{$particle});//remove particle from $data |
|
79 | + unset($data->{$particle}); //remove particle from $data |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |
83 | 83 | \ No newline at end of file |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | foreach ($node->attributes() as $attribute) { |
92 | 92 | switch ($attribute->getName()) { |
93 | 93 | case 'form': |
94 | - $this->form = (string)$attribute; |
|
94 | + $this->form = (string) $attribute; |
|
95 | 95 | break; |
96 | 96 | } |
97 | 97 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | cs:names element (taking into account the effects of et-al abbreviation and editor/translator collapsing), |
152 | 152 | which allows for advanced sorting. */ |
153 | 153 | if ($this->form == 'count') { |
154 | - return (int)count($resultNames); |
|
154 | + return (int) count($resultNames); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | return $text; |
@@ -503,8 +503,8 @@ discard block |
||
503 | 503 | $demoteNonDroppingParticle = CiteProc::getContext()->getGlobalOptions()->getDemoteNonDroppingParticles(); |
504 | 504 | |
505 | 505 | if ($this->form === "long" && $nameAsSortOrder && |
506 | - ((string)$demoteNonDroppingParticle === DemoteNonDroppingParticle::NEVER || |
|
507 | - (string)$demoteNonDroppingParticle === DemoteNonDroppingParticle::SORT_ONLY) |
|
506 | + ((string) $demoteNonDroppingParticle === DemoteNonDroppingParticle::NEVER || |
|
507 | + (string) $demoteNonDroppingParticle === DemoteNonDroppingParticle::SORT_ONLY) |
|
508 | 508 | ) { |
509 | 509 | |
510 | 510 | // [La] [Fontaine], [Jean] [de], [III] |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | $text .= !empty($data->suffix) ? $this->sortSeparator . $data->suffix : ""; |
518 | 518 | } else if ($this->form === "long" && $nameAsSortOrder && |
519 | 519 | (is_null($demoteNonDroppingParticle) || |
520 | - (string)$demoteNonDroppingParticle === DemoteNonDroppingParticle::DISPLAY_AND_SORT) |
|
520 | + (string) $demoteNonDroppingParticle === DemoteNonDroppingParticle::DISPLAY_AND_SORT) |
|
521 | 521 | ) { |
522 | 522 | // [Fontaine], [Jean] [de] [La], [III] |
523 | 523 |