Completed
Push — master ( 69f162...acb4bc )
by Sebastian
02:58
created
src/Seboettg/CiteProc/Rendering/Name/Name.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,6 +99,9 @@  discard block
 block discarded – undo
99 99
         $this->initDelimiterAttributes($node);
100 100
     }
101 101
 
102
+    /**
103
+     * @param integer $citationNumber
104
+     */
102 105
     public function render($data, $citationNumber = null)
103 106
     {
104 107
         if (!$this->attributesInitialized) {
@@ -450,7 +453,7 @@  discard block
 block discarded – undo
450 453
 
451 454
     /**
452 455
      * @param $data
453
-     * @param $preceding
456
+     * @param \stdClass $preceding
454 457
      * @return array
455 458
      */
456 459
     protected function renderSubsequentSubstitution($data, $preceding)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
 
115 115
         $resultNames = [];
116 116
 
117
-        $hasPreceding = CiteProc::getContext()->getCitationItems()->hasKey($citationNumber-1);
117
+        $hasPreceding = CiteProc::getContext()->getCitationItems()->hasKey($citationNumber - 1);
118 118
         $subsequentSubstitution = CiteProc::getContext()->getCitationItems()->getSubsequentAuthorSubstitute();
119 119
         $subsequentSubstitutionRule = CiteProc::getContext()->getCitationItems()->getSubsequentAuthorSubstituteRule();
120 120
         $useSubseqSubstitution = !empty($subsequentSubstitution) && !empty($subsequentSubstitutionRule);
121
-        $preceding = CiteProc::getContext()->getCitationItems()->get($citationNumber-1);
121
+        $preceding = CiteProc::getContext()->getCitationItems()->get($citationNumber - 1);
122 122
 
123 123
 
124 124
         if ($hasPreceding && $useSubseqSubstitution) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         which allows for advanced sorting. */
218 218
 
219 219
         if ($this->form == 'count') {
220
-            return (int)count($resultNames);
220
+            return (int) count($resultNames);
221 221
         }
222 222
 
223 223
         return $text;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         if (count($this->nameParts) > 0) {
237 237
             /** @var NamePart $namePart */
238 238
             foreach ($this->nameParts as $namePart) {
239
-                $nameObj->{$namePart->getName()} =   $namePart->render($name);
239
+                $nameObj->{$namePart->getName()} = $namePart->render($name);
240 240
             }
241 241
         }
242 242
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
                 subsequent-author-substitute substitutes for each rendered name. */
500 500
                 case SubsequentAuthorSubstituteRule::COMPLETE_EACH:
501 501
                     if ($this->identicalAuthors($preceding, $data)) {
502
-                        $resultNames[] =  $subsequentSubstitution;
502
+                        $resultNames[] = $subsequentSubstitution;
503 503
                     } else {
504 504
                         $resultNames[] = $this->formatName($name, $rank);
505 505
                     }
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Group.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $elementCount++;
77 77
             if (($child instanceof Text) &&
78 78
                 ($child->getSource() == 'term' ||
79
-                    $child->getSource() == 'value' )) {
79
+                    $child->getSource() == 'value')) {
80 80
                 $terms++;
81 81
             }
82 82
             if (($child instanceof Label)) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                     }
103 103
                 }
104 104
                 //give the text parts a name
105
-                if($child instanceof Text) {
105
+                if ($child instanceof Text) {
106 106
                     $textParts[$child->getVariable()] = $text;
107 107
                 } else {
108 108
                     $textParts[$elementCount] = $text;
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Name/Names.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
310 310
             return false;
311 311
         }
312 312
 
313
-        array_walk($persons1, function ($name, $key) use ($persons2, &$same) {
313
+        array_walk($persons1, function($name, $key) use ($persons2, &$same) {
314 314
             $family1 = $name->family;
315 315
             $family2 = $persons2[$key]->family;
316 316
             $same = $same && ($family1 === $family2);
Please login to merge, or discard this patch.