Completed
Push — master ( bf66ca...210cc2 )
by Sebastian
05:53
created
src/Seboettg/CiteProc/Style/Citation.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * Citation constructor.
37 37
      * @param \SimpleXMLElement $node
38
+     * @param \Seboettg\CiteProc\Root\Root $parent
38 39
      */
39 40
     public function __construct(\SimpleXMLElement $node, $parent)
40 41
     {
@@ -45,7 +46,7 @@  discard block
 block discarded – undo
45 46
     }
46 47
 
47 48
     /**
48
-     * @param array|DataList $data
49
+     * @param DataList $data
49 50
      * @param ArrayList $citationItems
50 51
      * @return string
51 52
      */
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Layout.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
     /**
186 186
      * @param $data
187
-     * @param $ret
187
+     * @param string $ret
188 188
      * @return string
189 189
      */
190 190
     private function renderCitations($data, $ret)
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     /**
203 203
      * @param DataList $data
204 204
      * @param ArrayList $citationItems
205
-     * @return mixed
205
+     * @return ArrayList
206 206
      */
207 207
     private function filterCitationItems($data, $citationItems)
208 208
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,7 @@
 block discarded – undo
86 86
         }
87 87
 
88 88
         if (CiteProc::getContext()->isModeBibliography()) {
89
-            foreach ($data as $citationNumber => $item) {
90
-                ++self::$numberOfCitedItems;
89
+            foreach ($data as $citationNumber => $item) {++self::$numberOfCitedItems;
91 90
                 CiteProc::getContext()->getResults()->append($this->wrapBibEntry($item, $this->renderSingle($item, $citationNumber)));
92 91
             }
93 92
             $ret .= implode($this->delimiter, CiteProc::getContext()->getResults()->toArray());
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Name/Name.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
     }
111 111
 
112 112
     /**
113
-     * @param array $name
114 113
      * @param integer|null $citationNumber
114
+     * @param \stdClass $data
115 115
      * @return string
116 116
      */
117 117
     public function render($data, $var, $citationNumber = null)
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
     }
572 572
 
573 573
     /**
574
-     * @param $data
574
+     * @param \stdClass $data
575 575
      * @return array
576 576
      */
577 577
     private function renderNameParts($data)
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Name/Names.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
228 228
 
229 229
 
230 230
     /**
231
-     * @param $data
231
+     * @param \stdClass $data
232 232
      * @param $var
233 233
      * @param $name
234 234
      * @return string
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Text.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,6 +165,9 @@  discard block
 block discarded – undo
165 165
         return $this->toRenderTypeValue;
166 166
     }
167 167
 
168
+    /**
169
+     * @param \stdClass $data
170
+     */
168 171
     private function renderPage($data)
169 172
     {
170 173
         if (empty($data->page)) {
@@ -194,9 +197,9 @@  discard block
 block discarded – undo
194 197
     }
195 198
 
196 199
     /**
197
-     * @param $data
200
+     * @param \stdClass $data
198 201
      * @param $renderedText
199
-     * @return mixed
202
+     * @return string
200 203
      */
201 204
     private function applyAdditionalMarkupFunction($data, $renderedText)
202 205
     {
Please login to merge, or discard this patch.
example/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,12 +95,12 @@
 block discarded – undo
95 95
             return '<a href="https://example.org/publication/' . $cslItem->id . '">' . $renderedText . '</a>';
96 96
         },
97 97
         "csl-entry" => function($cslItem, $renderedText) {
98
-            return '<a id="' . $cslItem->id .'" href="#' . $cslItem->id .'"></a>' . $renderedText;
98
+            return '<a id="' . $cslItem->id . '" href="#' . $cslItem->id . '"></a>' . $renderedText;
99 99
         }
100 100
     ],
101 101
     "citation" => [
102 102
         "citation-number" => function($cslItem, $renderedText) {
103
-            return '<a href="#' . $cslItem->id .'">'.$renderedText.'</a>';
103
+            return '<a href="#' . $cslItem->id . '">' . $renderedText . '</a>';
104 104
         }
105 105
     ]
106 106
 ]);
Please login to merge, or discard this patch.