Completed
Pull Request — master (#4514)
by Axel
04:33
created
src/system/BlocksModule/Api/BlockFactoryApi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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]));
Please login to merge, or discard this patch.
src/system/BlocksModule/AbstractBlockHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/system/ThemeModule/Engine/ParameterBag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,6 +214,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/system/ThemeModule/Engine/Asset/Merger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $this->lifetime,
115 115
             $this->kernel->getCacheDir() . '/assets/' . $type
116 116
         );
117
-        $key = md5(serialize($assets)) . (int)$this->minify . (int)$this->compress . $this->lifetime . '.combined.' . $type;
117
+        $key = md5(serialize($assets)) . (int) $this->minify . (int) $this->compress . $this->lifetime . '.combined.' . $type;
118 118
         $cacheService->get($key, function() use ($cachedFiles, $type) {
119 119
             $data = [];
120 120
             foreach ($cachedFiles as $k => $file) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         while (!feof($source)) {
167 167
             if ('css' === $ext) {
168 168
                 $line = fgets($source, 4096);
169
-                $lineParse = (string)s(false !== $line ? trim($line) : '');
169
+                $lineParse = (string) s(false !== $line ? trim($line) : '');
170 170
                 $lineParseLength = mb_strlen($lineParse, 'UTF-8');
171 171
                 $newLine = '';
172 172
                 // parse line char by char
Please login to merge, or discard this patch.
src/system/ThemeModule/Engine/Asset.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,16 +93,16 @@  discard block
 block discarded – undo
93 93
         $path = s($path);
94 94
         if (!$path->startsWith('@')) {
95 95
             $path = $path->trimStart('/');
96
-            $publicPath = $this->assetPackages->getUrl((string)$path);
96
+            $publicPath = $this->assetPackages->getUrl((string) $path);
97 97
             if (false !== realpath($httpRootDir . $publicPath)) {
98 98
                 return $publicPath;
99 99
             }
100 100
             throw new AssetNotFoundException(sprintf('Could not find asset "%s"', $httpRootDir . $publicPath));
101 101
         }
102 102
 
103
-        [$bundleName, $relativeAssetPath] = explode(':', (string)$path);
103
+        [$bundleName, $relativeAssetPath] = explode(':', (string) $path);
104 104
 
105
-        $bundleNameForAssetPath = (string)s($bundleName)->trimStart('@')->lower();
105
+        $bundleNameForAssetPath = (string) s($bundleName)->trimStart('@')->lower();
106 106
         $bundleAssetPath = $this->getBundleAssetPath($bundleName);
107 107
         $themeName = $this->themeEngine->getTheme()->getName();
108 108
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         if (!isset($bundleName)) {
143 143
             throw new InvalidArgumentException('No bundle name resolved, must be like "@AcmeBundle"');
144 144
         }
145
-        $bundle = $this->kernel->getBundle((string)s($bundleName)->trimStart('@'));
145
+        $bundle = $this->kernel->getBundle((string) s($bundleName)->trimStart('@'));
146 146
         if (!$bundle instanceof Bundle) {
147 147
             throw new InvalidArgumentException('Bundle ' . $bundleName . ' not found.');
148 148
         }
Please login to merge, or discard this patch.
src/system/SecurityCenterModule/Helper/CacheDirHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
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
                     }
Please login to merge, or discard this patch.
src/Zikula/CoreBundle/Helper/LocalDotEnvHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
                 $value = !empty($quote) ? $value->trim('\'')->trim('"') : $value;
69 69
                 $value = $quote . urlencode($value) . $quote;
70 70
             }
71
-            $lines[] = $key . '=' . (string)$value;
71
+            $lines[] = $key . '=' . (string) $value;
72 72
         }
73 73
 
74 74
         return trim(implode("\n", $lines));
Please login to merge, or discard this patch.
src/Zikula/CoreBundle/Maker/Validators.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Zikula/CoreBundle/Maker/ExtensionMaker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                     'namespace' => $namespace . $type,
166 166
                     'type' => $type,
167 167
                     'name' => $bundleClassNameDetails->getShortName(),
168
-                    'vendor' => (string)s($namespace)->before('\\'),
168
+                    'vendor' => (string) s($namespace)->before('\\'),
169 169
                 ]
170 170
             );
171 171
         }
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
                 [
193 193
                     'namespace' => $namespace . $type,
194 194
                     'type' => $type,
195
-                    'vendor' => (string)s($namespace)->before('\\'),
196
-                    'name' => (string)s($namespace)->after('\\'),
195
+                    'vendor' => (string) s($namespace)->before('\\'),
196
+                    'name' => (string) s($namespace)->after('\\'),
197 197
                     'bundleClass' => $bundleClass,
198 198
                 ]
199 199
             );
Please login to merge, or discard this patch.