@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | $wordArray = explode(" ", $text); |
79 | 79 | |
80 | - array_walk($wordArray, function (&$word) { |
|
80 | + array_walk($wordArray, function(&$word) { |
|
81 | 81 | $word = ucfirst($word); |
82 | 82 | }); |
83 | 83 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | return ""; |
95 | 95 | } |
96 | 96 | if (preg_match('/(.+[^\<\>][\.:\/;\?\!]\s?)([a-z])(.+)/', $titleString, $match)) { |
97 | - $titleString = $match[1].StringHelper::mb_ucfirst($match[2]).$match[3]; |
|
97 | + $titleString = $match[1] . StringHelper::mb_ucfirst($match[2]) . $match[3]; |
|
98 | 98 | } |
99 | 99 | $pattern = "/(\s|\/)/"; |
100 | 100 | if (!preg_match($pattern, $titleString, $matches)) { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $encoding = mb_detect_encoding($firstChar, self::ISO_ENCODINGS, true); |
155 | 155 | $new_ord = mb_ord($firstChar, $encoding); |
156 | 156 | return $original_ord === $new_ord && in_array($encoding, self::ISO_ENCODINGS) ? |
157 | - mb_strtoupper($firstChar, $encoding).$then : $firstChar.$then; |
|
157 | + mb_strtoupper($firstChar, $encoding) . $then : $firstChar . $then; |
|
158 | 158 | } |
159 | 159 | // phpcs:disable |
160 | 160 | public static function mb_strrev($string) |
@@ -203,13 +203,13 @@ discard block |
||
203 | 203 | foreach ($spaceExploded as $givenPart) { |
204 | 204 | $firstLetter = mb_substr($givenPart, 0, 1, "UTF-8"); |
205 | 205 | if (StringHelper::isLatinString($firstLetter)) { |
206 | - $res .= ctype_upper($firstLetter) ? $firstLetter.$initializeSign : " ".$givenPart." "; |
|
206 | + $res .= ctype_upper($firstLetter) ? $firstLetter . $initializeSign : " " . $givenPart . " "; |
|
207 | 207 | } else { |
208 | - $res .= $firstLetter.$initializeSign; |
|
208 | + $res .= $firstLetter . $initializeSign; |
|
209 | 209 | } |
210 | 210 | } |
211 | 211 | if ($i < count($exploded) - 1 && $initializeWithHyphen) { |
212 | - $res = rtrim($res)."-"; |
|
212 | + $res = rtrim($res) . "-"; |
|
213 | 213 | } |
214 | 214 | ++$i; |
215 | 215 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $innerCloseQuote |
273 | 273 | ) { |
274 | 274 | if (preg_match("/(.*)$outerOpenQuote(.+)$outerCloseQuote(.*)/u", $text, $match)) { |
275 | - return $match[1].$innerOpenQuote.$match[2].$innerCloseQuote.$match[3]; |
|
275 | + return $match[1] . $innerOpenQuote . $match[2] . $innerCloseQuote . $match[3]; |
|
276 | 276 | } |
277 | 277 | return $text; |
278 | 278 | } |
@@ -142,7 +142,9 @@ |
||
142 | 142 | public static function mb_ucfirst($string, $encoding = 'UTF-8') |
143 | 143 | {// phpcs:enable |
144 | 144 | $strlen = mb_strlen($string, $encoding); |
145 | - if ($strlen == 0) return ''; |
|
145 | + if ($strlen == 0) { |
|
146 | + return ''; |
|
147 | + } |
|
146 | 148 | $firstChar = mb_substr($string, 0, 1, $encoding); |
147 | 149 | $then = mb_substr($string, 1, $strlen - 1, $encoding); |
148 | 150 |