@@ -282,7 +282,7 @@ |
||
| 282 | 282 | return $this->router->generate($routePrefix . 'view'); |
| 283 | 283 | case 'userOwnView': |
| 284 | 284 | case 'adminOwnView': |
| 285 | - return $this->router->generate($routePrefix . 'view', [ 'own' => 1 ]); |
|
| 285 | + return $this->router->generate($routePrefix . 'view', ['own' => 1]); |
|
| 286 | 286 | case 'userDisplay': |
| 287 | 287 | case 'adminDisplay': |
| 288 | 288 | if ( |
@@ -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(); |
@@ -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 | /** |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | // this uses always a fixed environment (e.g. "prod") that is serialized |
| 59 | 59 | // in purifier configuration |
| 60 | 60 | // so ensure the main directory exists even if another environment is currently used |
| 61 | - $parentDirectory = (string)s($cacheDirectory)->slice(0, -9); |
|
| 61 | + $parentDirectory = (string) s($cacheDirectory)->slice(0, -9); |
|
| 62 | 62 | if (!$fs->exists($parentDirectory)) { |
| 63 | 63 | $fs->mkdir($parentDirectory); |
| 64 | 64 | } |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | $this->verified = in_array((int) $input->getOption('verified'), [0, 1, 2]) ? (int) $input->getOption('verified') : 1; |
| 134 | 134 | $regDate = $input->getOption('regdate') ?? $this->nowUTC; |
| 135 | 135 | $this->range = is_string($regDate) && '>' === $regDate[0]; |
| 136 | - $this->regDate = $this->range ? (string)s($regDate)->slice(1) : $regDate; |
|
| 136 | + $this->regDate = $this->range ? (string) s($regDate)->slice(1) : $regDate; |
|
| 137 | 137 | |
| 138 | 138 | $io->title('User generation utility'); |
| 139 | 139 | $io->text('Generating users...'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | public static function validateBundleNamespace(InputInterface $input, $allowSuffix = false): string |
| 23 | 23 | { |
| 24 | - $namespace = (string)s($input->getArgument('namespace'))->replace('/', '\\')->trim(); |
|
| 24 | + $namespace = (string) s($input->getArgument('namespace'))->replace('/', '\\')->trim(); |
|
| 25 | 25 | if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\\?)+$/', $namespace)) { |
| 26 | 26 | throw new InvalidArgumentException('The namespace contains invalid characters.'); |
| 27 | 27 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // validate reserved keywords |
| 30 | 30 | $reserved = self::getReservedWords(); |
| 31 | 31 | foreach (explode('\\', $namespace) as $word) { |
| 32 | - if (in_array((string)s($word)->lower(), $reserved, true)) { |
|
| 32 | + if (in_array((string) s($word)->lower(), $reserved, true)) { |
|
| 33 | 33 | throw new InvalidArgumentException(sprintf('The namespace cannot contain reserved words ("%s").', $word)); |
| 34 | 34 | } |
| 35 | 35 | } |