@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | foreach ($node->children() as $child) { |
97 | 97 | if ($child->getName() === "date-part") { |
98 | 98 | $datePartName = (string) $child->attributes()["name"]; |
99 | - $this->dateParts->set($this->form."-".$datePartName, Util\Factory::create($child)); |
|
99 | + $this->dateParts->set($this->form . "-" . $datePartName, Util\Factory::create($child)); |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
@@ -173,15 +173,15 @@ discard block |
||
173 | 173 | $toRender = 0; |
174 | 174 | if ($interval->y > 0 && in_array('year', $dateParts)) { |
175 | 175 | $toRender |= self::DATE_RANGE_STATE_YEAR; |
176 | - $delimiter = $this->dateParts->get($this->form."-year")->getRangeDelimiter(); |
|
176 | + $delimiter = $this->dateParts->get($this->form . "-year")->getRangeDelimiter(); |
|
177 | 177 | } |
178 | 178 | if ($interval->m > 0 && $from->getMonth() - $to->getMonth() !== 0 && in_array('month', $dateParts)) { |
179 | 179 | $toRender |= self::DATE_RANGE_STATE_MONTH; |
180 | - $delimiter = $this->dateParts->get($this->form."-month")->getRangeDelimiter(); |
|
180 | + $delimiter = $this->dateParts->get($this->form . "-month")->getRangeDelimiter(); |
|
181 | 181 | } |
182 | 182 | if ($interval->d > 0 && $from->getDay() - $to->getDay() !== 0 && in_array('day', $dateParts)) { |
183 | 183 | $toRender |= self::DATE_RANGE_STATE_DAY; |
184 | - $delimiter = $this->dateParts->get($this->form."-day")->getRangeDelimiter(); |
|
184 | + $delimiter = $this->dateParts->get($this->form . "-day")->getRangeDelimiter(); |
|
185 | 185 | } |
186 | 186 | if ($toRender === self::DATE_RANGE_STATE_NONE) { |
187 | 187 | $ret .= $this->iterateAndRenderDateParts($dateParts, $data_); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | } |
192 | 192 | |
193 | 193 | if (isset($var->raw) && preg_match("/(\p{L}+)\s?([\-\–&,])\s?(\p{L}+)/u", $var->raw, $matches)) { |
194 | - return $matches[1].$matches[2].$matches[3]; |
|
194 | + return $matches[1] . $matches[2] . $matches[3]; |
|
195 | 195 | } |
196 | 196 | } elseif (!empty($this->datePartsAttribute)) { |
197 | 197 | // fallback: |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $this->dateParts->add( |
350 | 350 | "$form-$datePart", |
351 | 351 | new DatePart( |
352 | - new SimpleXMLElement('<date-part name="'.$datePart.'" form="'.$form.'" />') |
|
352 | + new SimpleXMLElement('<date-part name="' . $datePart . '" form="' . $form . '" />') |
|
353 | 353 | ) |
354 | 354 | ); |
355 | 355 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | public static function appendParticleTo(&$data, $namePart, $particle) |
71 | 71 | { |
72 | 72 | if (isset($data->{$particle}) && isset($data->{$namePart})) { |
73 | - $data->{$namePart} = $data->{$namePart}." ".$data->{$particle}; // append $particle to $namePart |
|
73 | + $data->{$namePart} = $data->{$namePart} . " " . $data->{$particle}; // append $particle to $namePart |
|
74 | 74 | unset($data->{$particle}); //remove particle from $data |
75 | 75 | } |
76 | 76 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | public static function prependParticleTo(&$data, $namePart, $particle) |
85 | 85 | { |
86 | 86 | if (isset($data->{$particle}) && isset($data->{$namePart})) { |
87 | - $data->{$namePart} = $data->{$particle}." ".$data->{$namePart}; //prepend $particle to $namePart |
|
87 | + $data->{$namePart} = $data->{$particle} . " " . $data->{$namePart}; //prepend $particle to $namePart |
|
88 | 88 | unset($data->{$particle}); //remove particle from $data |
89 | 89 | } |
90 | 90 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | if (empty($data->family)) { |
122 | 122 | throw new CiteProcException("Illegal argument. Name has no family name."); |
123 | 123 | } |
124 | - return $data->family.(isset($data->given) ? $data->given : ""); |
|
124 | + return $data->family . (isset($data->given) ? $data->given : ""); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | public static function addExtendedMarkup($nameVar, $nameItem, $formattedName) |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | public static function capitalizeForTitle($titleString) |
93 | 93 | { |
94 | 94 | if (preg_match('/(.+[^\<\>][\.:\/;\?\!]\s?)([a-z])(.+)/', $titleString, $match)) { |
95 | - $titleString = $match[1].StringHelper::mb_ucfirst($match[2]).$match[3]; |
|
95 | + $titleString = $match[1] . StringHelper::mb_ucfirst($match[2]) . $match[3]; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $wordArray = explode(" ", $titleString); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | /** @noinspection PhpInternalEntityUsedInspection */ |
141 | 141 | $encoding = Mbstring::mb_detect_encoding($firstChar, self::ISO_ENCODINGS, true); |
142 | 142 | return in_array($encoding, self::ISO_ENCODINGS) ? |
143 | - Mbstring::mb_strtoupper($firstChar, $encoding).$then : $firstChar.$then; |
|
143 | + Mbstring::mb_strtoupper($firstChar, $encoding) . $then : $firstChar . $then; |
|
144 | 144 | } |
145 | 145 | // phpcs:disable |
146 | 146 | public static function mb_strrev($string) |
@@ -189,15 +189,15 @@ discard block |
||
189 | 189 | foreach ($spaceExploded as $givenPart) { |
190 | 190 | $firstLetter = mb_substr($givenPart, 0, 1, "UTF-8"); |
191 | 191 | if (StringHelper::isLatinString($firstLetter)) { |
192 | - $res .= ctype_upper($firstLetter) ? $firstLetter.$initializeSign : " ".$givenPart." "; |
|
192 | + $res .= ctype_upper($firstLetter) ? $firstLetter . $initializeSign : " " . $givenPart . " "; |
|
193 | 193 | } else { |
194 | - $res .= $firstLetter.$initializeSign; |
|
194 | + $res .= $firstLetter . $initializeSign; |
|
195 | 195 | } |
196 | 196 | } |
197 | 197 | if ($i < count($exploded) - 1 && $initializeWithHyphen) { |
198 | - $res = rtrim($res)."-"; |
|
198 | + $res = rtrim($res) . "-"; |
|
199 | 199 | } |
200 | - ++$i; |
|
200 | + ++ $i; |
|
201 | 201 | } |
202 | 202 | return $res; |
203 | 203 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $innerCloseQuote |
259 | 259 | ) { |
260 | 260 | if (preg_match("/(.*)$outerOpenQuote(.+)$outerCloseQuote(.*)/u", $text, $match)) { |
261 | - return $match[1].$innerOpenQuote.$match[2].$innerCloseQuote.$match[3]; |
|
261 | + return $match[1] . $innerOpenQuote . $match[2] . $innerCloseQuote . $match[3]; |
|
262 | 262 | } |
263 | 263 | return $text; |
264 | 264 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $ret = strcasecmp($numA, $numB); |
60 | 60 | } |
61 | 61 | if ("descending" === $order) { |
62 | - return $ret > 0 ? -1 : 1; |
|
62 | + return $ret > 0 ? - 1 : 1; |
|
63 | 63 | } |
64 | 64 | return $ret > 0 ? 1 : -1; |
65 | 65 | }; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | if ($num < 6000) { |
76 | 76 | $numStr = strrev($num); |
77 | 77 | $len = strlen($numStr); |
78 | - for ($pos = 0; $pos < $len; $pos++) { |
|
78 | + for ($pos = 0; $pos < $len; $pos ++) { |
|
79 | 79 | $n = $numStr[$pos]; |
80 | 80 | $ret = self::ROMAN_NUMERALS[$pos][$n] . $ret; |
81 | 81 | } |
@@ -53,12 +53,12 @@ |
||
53 | 53 | */ |
54 | 54 | public function __construct(Config\Locale $localeConfig, $xmlString = null) |
55 | 55 | { |
56 | - $this->language = (string)$localeConfig; |
|
56 | + $this->language = (string) $localeConfig; |
|
57 | 57 | |
58 | 58 | if (!empty($xmlString)) { |
59 | 59 | $this->localeXml = new SimpleXMLElement($xmlString); |
60 | 60 | } else { |
61 | - $this->localeXml = new SimpleXMLElement(loadLocales((string)$localeConfig)); |
|
61 | + $this->localeXml = new SimpleXMLElement(loadLocales((string) $localeConfig)); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $this->initLocaleXmlParser(); |