@@ -49,7 +49,7 @@ |
||
| 49 | 49 | foreach ($menuItems as $menuItem) { |
| 50 | 50 | if ($menuItem->hasOption('icon')) { |
| 51 | 51 | $iconClass = (string) $menuItem->getOption('icon'); |
| 52 | - $menuItem->setOption('icon', 'fas' . (string)s($iconClass)->slice(3)); |
|
| 52 | + $menuItem->setOption('icon', 'fas' . (string) s($iconClass)->slice(3)); |
|
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | $this->entityManager->flush(); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | string $title = '' |
| 96 | 96 | ): string { |
| 97 | 97 | if (empty($userId) || $userId < 1) { |
| 98 | - return (string)$userId; |
|
| 98 | + return (string) $userId; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | return $this->determineProfileLink($userId, null, $class, $image, $maxLength, $title); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | // truncate the user name to $maxLength chars |
| 165 | 165 | $length = mb_strlen($userDisplayName); |
| 166 | 166 | $truncEnd = ($maxLength > $length) ? $length : $maxLength; |
| 167 | - $show = htmlspecialchars((string)s($userDisplayName)->slice(0, $truncEnd), ENT_QUOTES); |
|
| 167 | + $show = htmlspecialchars((string) s($userDisplayName)->slice(0, $truncEnd), ENT_QUOTES); |
|
| 168 | 168 | } else { |
| 169 | 169 | $show = htmlspecialchars($userDisplayName, ENT_QUOTES); |
| 170 | 170 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | $ns = $this->getNamespace(); |
| 33 | 33 | $installerName = s($ns)->afterLast('\\')->append('Installer'); |
| 34 | - $class = $ns . '\\' . (string)$installerName; |
|
| 34 | + $class = $ns . '\\' . (string) $installerName; |
|
| 35 | 35 | |
| 36 | 36 | return $class; |
| 37 | 37 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $folder = $this->getNameType() . 's/'; |
| 68 | 68 | $name = s($this->getName())->trimEnd($this->getNameType()); |
| 69 | 69 | |
| 70 | - return (string)s($folder . $name)->lower(); |
|
| 70 | + return (string) s($folder . $name)->lower(); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | public function getNameType(): string |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | // rewrite local links |
| 77 | 77 | $content = preg_replace_callback( |
| 78 | 78 | '/\[(.*?)\]\((.*?)\)/', |
| 79 | - function ($match) use ($router, $moduleName, $raw) { |
|
| 79 | + function($match) use ($router, $moduleName, $raw) { |
|
| 80 | 80 | $pageName = s($match[2]); |
| 81 | 81 | if (false === mb_strpos($match[2], '.md')) { |
| 82 | 82 | return $match[0]; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | // local link - rewrite |
| 89 | 89 | $urlArgs = [ |
| 90 | 90 | 'moduleName' => $moduleName, |
| 91 | - 'page' => (string)$pageName->trimEnd('.md') |
|
| 91 | + 'page' => (string) $pageName->trimEnd('.md') |
|
| 92 | 92 | ]; |
| 93 | 93 | if (1 === $raw) { |
| 94 | 94 | $urlArgs['raw'] = 1; |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if (null !== $bundle) { |
| 61 | - $bundle = (string)s($bundle)->trimStart('@'); |
|
| 61 | + $bundle = (string) s($bundle)->trimStart('@'); |
|
| 62 | 62 | |
| 63 | 63 | $this->extractTranslationHelper->setExtensionName($bundle); |
| 64 | 64 | } |
@@ -359,7 +359,7 @@ |
||
| 359 | 359 | } |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | - return (string)s($extensionName . $separator . $type . $separator . $func)->lower() . $suffix; |
|
| 362 | + return (string) s($extensionName . $separator . $type . $separator . $func)->lower() . $suffix; |
|
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | /** |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | throw new RuntimeException(sprintf('Block class %s must implement Zikula\BlocksModule\BlockHandlerInterface.', $blockClassName)); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $blockClassName = (string)s($blockClassName)->trimStart('\\'); |
|
| 57 | + $blockClassName = (string) s($blockClassName)->trimStart('\\'); |
|
| 58 | 58 | |
| 59 | 59 | if (!$this->container->has($blockClassName)) { |
| 60 | 60 | throw new RuntimeException($this->translator->trans('Block class %className% not found in container.', ['%className%' => $blockClassName])); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | { |
| 109 | 109 | // default to the ClassName without the `Block` suffix |
| 110 | 110 | // note: This string is intentionally left untranslated. |
| 111 | - return (string)s(static::class)->afterLast('\\')->trimEnd('Block'); |
|
| 111 | + return (string) s(static::class)->afterLast('\\')->trimEnd('Block'); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -214,6 +214,6 @@ |
||
| 214 | 214 | */ |
| 215 | 215 | private function resolveKey(string $key): string |
| 216 | 216 | { |
| 217 | - return (string)s($key)->trimStart($this->ns); |
|
| 217 | + return (string) s($key)->trimStart($this->ns); |
|
| 218 | 218 | } |
| 219 | 219 | } |