@@ -310,7 +310,7 @@ |
||
| 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); |
@@ -430,7 +430,7 @@ |
||
| 430 | 430 | |
| 431 | 431 | public function getCitationItemById($id) |
| 432 | 432 | { |
| 433 | - return $this->citationItems->filter(function ($item) use ($id) { |
|
| 433 | + return $this->citationItems->filter(function($item) use ($id) { |
|
| 434 | 434 | return $item->id === $id; |
| 435 | 435 | })->current(); |
| 436 | 436 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | public static function mapLocatorLabelToRenderVariable($locatorTerm) |
| 40 | 40 | { |
| 41 | 41 | if ($locatorTerm instanceof Locator) { |
| 42 | - $locatorTerm = (string)$locatorTerm; |
|
| 42 | + $locatorTerm = (string) $locatorTerm; |
|
| 43 | 43 | } |
| 44 | 44 | return |
| 45 | 45 | array_key_exists($locatorTerm, self::LABEL_TO_VARIABLE_MAP) ? |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ); |
| 161 | 161 | } |
| 162 | 162 | list($from, $to) = $ranges; |
| 163 | - return $from . "–" . $to; |
|
| 163 | + return $from."–".$to; |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | return $page; |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | // test case group_ShortOutputOnly.json |
| 212 | 212 | $value = ""; |
| 213 | 213 | if (in_array($this->form, ["short", "long"])) { |
| 214 | - $attrWithPrefix = $this->form . ucfirst($this->toRenderTypeValue); |
|
| 215 | - $attrWithSuffix = $this->toRenderTypeValue . "-" . $this->form; |
|
| 214 | + $attrWithPrefix = $this->form.ucfirst($this->toRenderTypeValue); |
|
| 215 | + $attrWithSuffix = $this->toRenderTypeValue."-".$this->form; |
|
| 216 | 216 | if (isset($data->{$attrWithPrefix}) && !empty($data->{$attrWithPrefix})) { |
| 217 | 217 | $value = $data->{$attrWithPrefix}; |
| 218 | 218 | } else { |
@@ -53,12 +53,12 @@ |
||
| 53 | 53 | if (preg_match("/([^\.,;]+)([\.,;]{1,})$/", $text, $match)) { |
| 54 | 54 | $punctuation = substr($match[2], -1); |
| 55 | 55 | if ($this->suffix !== $punctuation) { |
| 56 | - $text = $match[1] . substr($match[2], 0, strlen($match[2]) - 1); |
|
| 57 | - return $openQuote . $text . $closeQuote . $punctuation; |
|
| 56 | + $text = $match[1].substr($match[2], 0, strlen($match[2]) - 1); |
|
| 57 | + return $openQuote.$text.$closeQuote.$punctuation; |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | - return $openQuote . $text . $closeQuote; |
|
| 61 | + return $openQuote.$text.$closeQuote; |
|
| 62 | 62 | } |
| 63 | 63 | return $text; |
| 64 | 64 | } |
@@ -91,8 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | if (CiteProc::getContext()->isModeBibliography()) { |
| 94 | - foreach ($data as $citationNumber => $item) { |
|
| 95 | - ++self::$numberOfCitedItems; |
|
| 94 | + foreach ($data as $citationNumber => $item) {++self::$numberOfCitedItems; |
|
| 96 | 95 | CiteProc::getContext()->getResults()->append( |
| 97 | 96 | $this->wrapBibEntry($item, $this->renderSingle($item, $citationNumber)) |
| 98 | 97 | ); |
@@ -149,8 +148,8 @@ discard block |
||
| 149 | 148 | $this->htmlentities($this->format(implode("", $margin))). |
| 150 | 149 | $this->suffix |
| 151 | 150 | ); |
| 152 | - $res = '<div class="csl-left-margin">' . trim($leftMargin) . '</div>'; |
|
| 153 | - $res .= '<div class="csl-right-inline">' . trim($rightInline) . '</div>'; |
|
| 151 | + $res = '<div class="csl-left-margin">'.trim($leftMargin).'</div>'; |
|
| 152 | + $res .= '<div class="csl-right-inline">'.trim($rightInline).'</div>'; |
|
| 154 | 153 | return $res; |
| 155 | 154 | } elseif (!empty($inMargin)) { |
| 156 | 155 | $res = $this->format(implode("", $inMargin)); |
@@ -176,8 +175,8 @@ discard block |
||
| 176 | 175 | { |
| 177 | 176 | $value = $this->addAffixes($value); |
| 178 | 177 | return "\n ". |
| 179 | - "<div class=\"csl-entry\">" . |
|
| 180 | - $renderedItem = CiteProcHelper::applyAdditionMarkupFunction($dataItem, "csl-entry", $value) . |
|
| 178 | + "<div class=\"csl-entry\">". |
|
| 179 | + $renderedItem = CiteProcHelper::applyAdditionMarkupFunction($dataItem, "csl-entry", $value). |
|
| 181 | 180 | "</div>"; |
| 182 | 181 | } |
| 183 | 182 | |
@@ -218,7 +217,7 @@ discard block |
||
| 218 | 217 | { |
| 219 | 218 | $arr = $data->toArray(); |
| 220 | 219 | |
| 221 | - $arr_ = array_filter($arr, function ($dataItem) use ($citationItems) { |
|
| 220 | + $arr_ = array_filter($arr, function($dataItem) use ($citationItems) { |
|
| 222 | 221 | foreach ($citationItems as $citationItem) { |
| 223 | 222 | if ($dataItem->id === $citationItem->id) { |
| 224 | 223 | return true; |