@@ -133,7 +133,7 @@ |
||
| 133 | 133 | */ |
| 134 | 134 | public function render($data, $var, $citationNumber = null) |
| 135 | 135 | { |
| 136 | - $this->nameOptions = $this->nameOptionsArray[(string)CiteProc::getContext()->getMode()]; |
|
| 136 | + $this->nameOptions = $this->nameOptionsArray[(string) CiteProc::getContext()->getMode()]; |
|
| 137 | 137 | $this->nameOrderRenderer->setNameOptions($this->nameOptions); |
| 138 | 138 | $this->delimiter = $this->nameOptions->getNameDelimiter() ?? $this->delimiter; |
| 139 | 139 | $this->variable = $var; |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | public static function factory(SimpleXMLElement $node): NamePart |
| 47 | 47 | { |
| 48 | - $name = (string)$node['name']; |
|
| 48 | + $name = (string) $node['name']; |
|
| 49 | 49 | $stylesRenderer = StylesRenderer::factory($node); |
| 50 | 50 | return new self($name, $stylesRenderer); |
| 51 | 51 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - $variables = new ArrayList(...explode(" ", (string)$node['variable'])); |
|
| 153 | + $variables = new ArrayList(...explode(" ", (string) $node['variable'])); |
|
| 154 | 154 | $names->setVariables($variables); |
| 155 | 155 | CiteProc::getContext()->addObserver($names); |
| 156 | 156 | return $names; |
@@ -369,6 +369,6 @@ discard block |
||
| 369 | 369 | */ |
| 370 | 370 | public function getNameOptions(RenderingMode $mode): NameOptions |
| 371 | 371 | { |
| 372 | - return $this->nameOptions[(string)$mode]; |
|
| 372 | + return $this->nameOptions[(string) $mode]; |
|
| 373 | 373 | } |
| 374 | 374 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $stylesRenderer = StylesRenderer::factory($node); |
| 92 | 92 | $layout->setChildren($children); |
| 93 | 93 | $layout->setStylesRenderer($stylesRenderer); |
| 94 | - $layout->setDelimiter((string)$node->attributes()['delimiter']); |
|
| 94 | + $layout->setDelimiter((string) $node->attributes()['delimiter']); |
|
| 95 | 95 | CiteProc::getContext()->addObserver($layout); |
| 96 | 96 | return $layout; |
| 97 | 97 | } |
@@ -117,8 +117,7 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | if ($this->mode->equals(RenderingMode::BIBLIOGRAPHY())) { |
| 120 | - foreach ($data as $citationNumber => $item) { |
|
| 121 | - ++self::$numberOfCitedItems; |
|
| 120 | + foreach ($data as $citationNumber => $item) {++self::$numberOfCitedItems; |
|
| 122 | 121 | CiteProc::getContext()->getResults()->append( |
| 123 | 122 | $this->wrapBibEntry($item, $this->renderSingle($item, $citationNumber)) |
| 124 | 123 | ); |
@@ -202,7 +201,7 @@ discard block |
||
| 202 | 201 | private function wrapBibEntry(stdClass $dataItem, string $value): string |
| 203 | 202 | { |
| 204 | 203 | $value = $this->stylesRenderer->renderAffixes($value); |
| 205 | - return "\n ". |
|
| 204 | + return "\n " . |
|
| 206 | 205 | "<div class=\"csl-entry\">" . |
| 207 | 206 | $renderedItem = CiteProcHelper::applyAdditionMarkupFunction($dataItem, "csl-entry", $value) . |
| 208 | 207 | "</div>"; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | '`citationItems`, ' . |
| 42 | 42 | 'array or ArrayList expected.'); |
| 43 | 43 | } |
| 44 | - switch ((string)$mode) { |
|
| 44 | + switch ((string) $mode) { |
|
| 45 | 45 | case Config\RenderingMode::BIBLIOGRAPHY: |
| 46 | 46 | CiteProc::getContext()->setMode($mode); |
| 47 | 47 | // set CitationItems to Context |
@@ -234,12 +234,12 @@ |
||
| 234 | 234 | |
| 235 | 235 | public function setSorting(RenderingMode $mode, $sorting) |
| 236 | 236 | { |
| 237 | - $this->sorting[(string)$mode] = $sorting; |
|
| 237 | + $this->sorting[(string) $mode] = $sorting; |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | public function getSorting() |
| 241 | 241 | { |
| 242 | - return $this->sorting[(string)$this->mode] ?? null; |
|
| 242 | + return $this->sorting[(string) $this->mode] ?? null; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | /** |