Completed
Branch 1.4 (78c96b)
by Axel
22:13
created
src/system/SearchModule/Block/SearchBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
         }
89 89
         // remove disabled
90 90
         foreach ($searchModules as $displayName => $moduleName) {
91
-            if ((bool) $this->getVar('disable_' . $moduleName, true)) {
91
+            if ((bool)$this->getVar('disable_' . $moduleName, true)) {
92 92
                 unset($searchModules[$displayName]);
93 93
             }
94 94
         }
Please login to merge, or discard this patch.
src/system/SearchModule/DependencyInjection/ZikulaSearchExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function load(array $configs, ContainerBuilder $container)
28 28
     {
29
-        $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config')));
29
+        $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config')));
30 30
 
31 31
         $loader->load('services.yml');
32 32
     }
Please login to merge, or discard this patch.
src/system/SettingsModule/Api/LocaleApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,13 +194,13 @@
 block discarded – undo
194 194
             if (property_exists($this, $key)) {
195 195
                 switch (true) {
196 196
                     case is_bool($this->$key):
197
-                        $this->$key = (bool) $data;
197
+                        $this->$key = (bool)$data;
198 198
                         break;
199 199
                     case is_array($this->$key):
200 200
                         $this->$key = explode(',', $data);
201 201
                         break;
202 202
                     case is_int($this->$key):
203
-                        $this->$key = (int) $data;
203
+                        $this->$key = (int)$data;
204 204
                         break;
205 205
                     default:
206 206
                         $this->$key = $data;
Please login to merge, or discard this patch.
src/system/SettingsModule/DependencyInjection/ZikulaSettingsExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function load(array $configs, ContainerBuilder $container)
28 28
     {
29
-        $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config')));
29
+        $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config')));
30 30
 
31 31
         $loader->load('services.yml');
32 32
     }
Please login to merge, or discard this patch.
src/system/SettingsModule/Controller/SettingsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
                 }
126 126
                 $this->setSystemVars($data);
127 127
                 // update the custom_parameters.yml file
128
-                $yamlManager = new YamlDumper($this->get('kernel')->getRootDir() .'/config');
128
+                $yamlManager = new YamlDumper($this->get('kernel')->getRootDir() . '/config');
129 129
                 $yamlManager->setParameter('locale', $data['language_i18n']);
130 130
 
131 131
                 $this->get('zikularoutesmodule.multilingual_routing_helper')->reloadMultilingualRoutingSettings(); // resets config/dynamic/generated.yml
Please login to merge, or discard this patch.
src/system/SettingsModule/Form/Type/MainSettingsType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
         $translator = $options['translator'];
33 33
 
34 34
         $spaceReplaceCallbackTransformer = new CallbackTransformer(
35
-            function ($originalDescription) {
35
+            function($originalDescription) {
36 36
                 return $originalDescription;
37 37
             },
38
-            function ($submittedDescription) {
38
+            function($submittedDescription) {
39 39
                 return mb_ereg_replace(' ', '', $submittedDescription);
40 40
             }
41 41
         );
42 42
         $pageTitleLocalizationTransformer = new CallbackTransformer(
43
-            function ($originalPageTitle) use ($translator) {
43
+            function($originalPageTitle) use ($translator) {
44 44
                 $originalPageTitle = empty($originalPageTitle) ? '%pagetitle%' : $originalPageTitle;
45 45
                 $originalPageTitle = str_replace('%pagetitle%', $translator->__('%pagetitle%'), $originalPageTitle);
46 46
                 $originalPageTitle = str_replace('%sitename%', $translator->__('%sitename%'), $originalPageTitle);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
                 return $originalPageTitle;
50 50
             },
51
-            function ($submittedPageTitle) use ($translator) {
51
+            function($submittedPageTitle) use ($translator) {
52 52
                 $submittedPageTitle = str_replace($translator->__('%pagetitle%'), '%pagetitle%', $submittedPageTitle);
53 53
                 $submittedPageTitle = str_replace($translator->__('%sitename%'), '%sitename%', $submittedPageTitle);
54 54
                 $submittedPageTitle = str_replace($translator->__('%modulename%'), '%modulename%', $submittedPageTitle);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             ->add('entrypoint', 'Symfony\Component\Form\Extension\Core\Type\TextType', [
112 112
                 'label' => $translator->__('Site entry point (front controller)'),
113 113
                 'constraints' => new Callback([
114
-                    'callback' => function ($data, ExecutionContextInterface $context) use ($options) {
114
+                    'callback' => function($data, ExecutionContextInterface $context) use ($options) {
115 115
                         $falseEntryPoints = ['admin.php', 'ajax.php', 'user.php', 'mo2json.php', 'jcss.php'];
116 116
                         $entryPointExt = pathinfo($data, PATHINFO_EXTENSION);
117 117
                         if (in_array($data, $falseEntryPoints) || strtolower($entryPointExt) != 'php') {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 $builder->create('permasearch', 'Symfony\Component\Form\Extension\Core\Type\TextType', [
153 153
                     'label' => $translator->__('List to search for'),
154 154
                     'constraints' => new Callback([
155
-                        'callback' => function ($data, ExecutionContextInterface $context) use ($options) {
155
+                        'callback' => function($data, ExecutionContextInterface $context) use ($options) {
156 156
                             if (mb_ereg(',$', $data)) {
157 157
                                 $context->addViolation($options['translator']->__('Error! In your permalink settings, strings cannot be terminated with a comma.'));
158 158
                             }
Please login to merge, or discard this patch.
src/system/SettingsModule/SettingsModuleInstaller.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,9 +170,9 @@
 block discarded – undo
170 170
                 $newStargArgs = str_replace(',', '&', $this->getSystemVar('startargs')); // replace comma with `&`
171 171
                 $this->setSystemVar('startargs', $newStargArgs);
172 172
             case '2.9.11':
173
-                $this->setSystemVar('shorturls', (bool) $this->getSystemVar('shorturls'));
174
-                $this->setSystemVar('shorturlsstripentrypoint', (bool) $this->getSystemVar('shorturlsstripentrypoint'));
175
-                $this->setSystemVar('useCompression', (bool) $this->getSystemVar('useCompression'));
173
+                $this->setSystemVar('shorturls', (bool)$this->getSystemVar('shorturls'));
174
+                $this->setSystemVar('shorturlsstripentrypoint', (bool)$this->getSystemVar('shorturlsstripentrypoint'));
175
+                $this->setSystemVar('useCompression', (bool)$this->getSystemVar('useCompression'));
176 176
             case '2.9.12': // ship with Core-1.4.4
177 177
                 // current version
178 178
         }
Please login to merge, or discard this patch.
src/system/ThemeModule/Api/AdminApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         }
93 93
 
94 94
         $themeinfo = ThemeUtil::getInfo(ThemeUtil::getIDFromName($args['themename']));
95
-        if (!file_exists('themes/' . DataUtil::formatForOS($themeinfo['directory']). '/' . $themeinfo['name'] . '.php')) {
95
+        if (!file_exists('themes/' . DataUtil::formatForOS($themeinfo['directory']) . '/' . $themeinfo['name'] . '.php')) {
96 96
             throw new \InvalidArgumentException(__('Invalid arguments array received'));
97 97
         }
98 98
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
         $ostemp  = CacheUtil::getLocalDir();
230 230
         $ostheme = DataUtil::formatForOS($themename);
231
-        $osfile  = $ostemp.'/Theme_Config/'.$ostheme.'/'.DataUtil::formatForOS($args['file']);
231
+        $osfile  = $ostemp . '/Theme_Config/' . $ostheme . '/' . DataUtil::formatForOS($args['file']);
232 232
 
233 233
         if (file_exists($osfile) && is_writable($osfile)) {
234 234
             unlink($osfile);
Please login to merge, or discard this patch.
src/system/ThemeModule/Api/UserApi.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
         $themename = $args['theme'];
287 287
         $theme = ThemeUtil::getTheme($themename);
288
-        $themeinfo   = ThemeUtil::getInfo(ThemeUtil::getIDFromName($themename));
288
+        $themeinfo = ThemeUtil::getInfo(ThemeUtil::getIDFromName($themename));
289 289
         if (isset($theme)) {
290 290
             $templatedir = $theme->getConfigPath();
291 291
         } else {
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
 
323 323
         $themeinfo = ThemeUtil::getInfo(ThemeUtil::getIDFromName($args['theme']));
324 324
         if ($theme = ThemeUtil::getTheme($themeinfo['name'])) {
325
-            $templatedir = $theme->getPath().'/Resources/views';
325
+            $templatedir = $theme->getPath() . '/Resources/views';
326 326
         } else {
327
-            $templatedir = 'themes/'.DataUtil::formatForOS($themeinfo['directory']).'/templates';
327
+            $templatedir = 'themes/' . DataUtil::formatForOS($themeinfo['directory']) . '/templates';
328 328
         }
329 329
 
330 330
         if ($args['type'] == 'modules') {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             $templatelist = [];
335 335
         }
336 336
 
337
-        $templatelist = array_merge($templatelist, FileUtil::getFiles($templatedir.'/'.$args['type'], false, $args['type'], ['.tpl', '.htm'], 'f'));
337
+        $templatelist = array_merge($templatelist, FileUtil::getFiles($templatedir . '/' . $args['type'], false, $args['type'], ['.tpl', '.htm'], 'f'));
338 338
 
339 339
         return $templatelist;
340 340
     }
@@ -374,12 +374,12 @@  discard block
 block discarded – undo
374 374
         $ostheme  = DataUtil::formatForOS($themeinfo['directory']);
375 375
         $osfile   = DataUtil::formatForOS($args['file']);
376 376
 
377
-        if (file_exists($ostemp.'/Theme_Config/'.$ostheme.'/'.$osfile)) {
378
-            return parse_ini_file($ostemp.'/Theme_Config/'.$ostheme.'/'.$osfile, $args['sections']);
379
-        } elseif (file_exists('themes/'.$ostheme.'/templates/config/'.$osfile)) {
380
-            return parse_ini_file('themes/'.$ostheme.'/templates/config/'.$osfile, $args['sections']);
377
+        if (file_exists($ostemp . '/Theme_Config/' . $ostheme . '/' . $osfile)) {
378
+            return parse_ini_file($ostemp . '/Theme_Config/' . $ostheme . '/' . $osfile, $args['sections']);
379
+        } elseif (file_exists('themes/' . $ostheme . '/templates/config/' . $osfile)) {
380
+            return parse_ini_file('themes/' . $ostheme . '/templates/config/' . $osfile, $args['sections']);
381 381
         } elseif ($theme = ThemeUtil::getTheme($themeinfo['name'])) {
382
-            $file = $theme->getPath().'/Resources/config/'.$osfile;
382
+            $file = $theme->getPath() . '/Resources/config/' . $osfile;
383 383
             if (file_exists($file)) {
384 384
                 return parse_ini_file($file, $args['sections']);
385 385
             } else {
@@ -423,20 +423,20 @@  discard block
 block discarded – undo
423 423
 
424 424
         // verify the writable paths
425 425
         if ($theme = ThemeUtil::getTheme($themeinfo['name'])) {
426
-            $tpath = $theme->getPath().'/Resources/config';
426
+            $tpath = $theme->getPath() . '/Resources/config';
427 427
         } else {
428
-            $tpath = 'themes/'.$ostheme.'/templates/config';
428
+            $tpath = 'themes/' . $ostheme . '/templates/config';
429 429
         }
430 430
 
431
-        if (is_writable($tpath.'/'.$osfile)) {
432
-            $handle = fopen($tpath.'/'.$osfile, 'w+');
431
+        if (is_writable($tpath . '/' . $osfile)) {
432
+            $handle = fopen($tpath . '/' . $osfile, 'w+');
433 433
         } else {
434
-            if (!file_exists($zpath = $ostemp.'/Theme_Config/'.$ostheme)) {
434
+            if (!file_exists($zpath = $ostemp . '/Theme_Config/' . $ostheme)) {
435 435
                 mkdir($zpath, $this->serviceManager['system.chmod_dir'], true);
436 436
             }
437 437
 
438
-            if (!file_exists($zpath.'/'.$osfile) || is_writable($zpath.'/'.$osfile)) {
439
-                $handle = fopen($zpath.'/'.$osfile, 'w+');
438
+            if (!file_exists($zpath . '/' . $osfile) || is_writable($zpath . '/' . $osfile)) {
439
+                $handle = fopen($zpath . '/' . $osfile, 'w+');
440 440
             } else {
441 441
                 throw new \RuntimeException($this->__f('Error! Cannot write in "%1$s" or "%2$s" to store the contents of "%3$s"', [$tpath, $zpath, $osfile]));
442 442
             }
Please login to merge, or discard this patch.