Completed
Pull Request — master (#3643)
by Craig
09:50
created
src/lib/Zikula/Bundle/CoreBundle/DependencyInjection/Configuration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function __construct($debug)
31 31
     {
32
-        $this->debug = (bool) $debug;
32
+        $this->debug = (bool)$debug;
33 33
     }
34 34
 
35 35
     /**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         ->fixXmlConfig('fallback')
57 57
         ->children()
58 58
         ->arrayNode('fallbacks')
59
-        ->beforeNormalization()->ifString()->then(function ($v) {
59
+        ->beforeNormalization()->ifString()->then(function($v) {
60 60
             return [$v];
61 61
         })->end()
62 62
         ->prototype('scalar')->end()
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Tests/Twig/Node/SwitchNodeTest.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     case 0:
64 64
         echo "case 0";
65 65
 }
66
-EOF
66
+eof
67 67
         ];
68 68
 
69 69
         // #2 switch with two cases, second with break
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         echo "case 1";
90 90
         break;
91 91
 }
92
-EOF
92
+eof
93 93
         ];
94 94
 
95 95
         // #3 switch with two cases (second with break) and default
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     default:
118 118
         echo "default case";
119 119
 }
120
-EOF
120
+eof
121 121
         ];
122 122
 
123 123
         // #4 switch with two cases (first without body, second with break) and default
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     default:
145 145
         echo "default case";
146 146
 }
147
-EOF
147
+eof
148 148
         ];
149 149
 
150 150
         return $tests;
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Tests/Functional/AppKernel.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
         $fs = new Filesystem();
28 28
         if (!$fs->isAbsolutePath($config)) {
29
-            $config = __DIR__.'/config/'.$config;
29
+            $config = __DIR__ . '/config/' . $config;
30 30
         }
31 31
 
32 32
         if (!file_exists($config)) {
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Tests/Bundle/MetaDataTest.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         }
119 119
     }
120 120
 }
121
-EOF
121
+eof
122 122
         ;
123 123
 
124 124
         return json_decode($json, true);
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Command/BootstrapBundlesCommand.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             ->setDescription('Loads bundles into persistences')
25 25
             ->setHelp(<<<'EOT'
26 26
 The <info>scan:bundles</info> command loads bundle table.
27
-EOT
27
+eot
28 28
             )
29 29
             ->setDefinition([
30 30
                 new InputArgument('create', InputArgument::OPTIONAL, 'Create schema'),
Please login to merge, or discard this patch.
src/system/GroupsModule/Controller/MembershipController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
         if ($gid < 1 || $uid < 1) {
133 133
             throw new \InvalidArgumentException($this->__('Invalid Group ID or User ID.'));
134 134
         }
135
-        if (!$this->hasPermission('ZikulaGroupsModule::', $gid.'::', ACCESS_EDIT)) {
135
+        if (!$this->hasPermission('ZikulaGroupsModule::', $gid . '::', ACCESS_EDIT)) {
136 136
             throw new AccessDeniedException();
137 137
         }
138 138
         $group = $this->get('zikula_groups_module.group_repository')->find($gid);
Please login to merge, or discard this patch.
src/system/RoutesModule/Form/Handler/Route/Base/AbstractEditHandler.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -378,7 +378,7 @@
 block discarded – undo
378 378
     /**
379 379
      * Get list of allowed redirect codes.
380 380
      *
381
-     * @return array list of possible redirect codes
381
+     * @return string[] list of possible redirect codes
382 382
      */
383 383
     protected function getRedirectCodes()
384 384
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         try {
224 224
             // execute the workflow action
225 225
             $success = $this->workflowHelper->executeAction($entity, $action);
226
-        } catch(\Exception $exception) {
226
+        } catch (\Exception $exception) {
227 227
             $flashBag->add('error', $this->__f('Sorry, but an error occured during the %action% action. Please apply the changes again!', ['%action%' => $action]) . ' ' . $exception->getMessage());
228 228
             $logArgs = ['app' => 'ZikulaRoutesModule', 'user' => $this->currentUserApi->get('uname'), 'entity' => 'route', 'id' => $entity->getKey(), 'errorMessage' => $exception->getMessage()];
229 229
             $this->logger->error('{app}: User {user} tried to edit the {entity} with id {id}, but failed. Error details: {errorMessage}.', $logArgs);
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                 return $this->router->generate($routePrefix . 'view');
278 278
             case 'userOwnView':
279 279
             case 'adminOwnView':
280
-                return $this->router->generate($routePrefix . 'view', [ 'own' => 1 ]);
280
+                return $this->router->generate($routePrefix . 'view', ['own' => 1]);
281 281
             case 'userDisplay':
282 282
             case 'adminDisplay':
283 283
                 if ($args['commandName'] != 'delete' && !($this->templateParameters['mode'] == 'create' && $args['commandName'] == 'cancel')) {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,13 +12,11 @@
 block discarded – undo
12 12
 
13 13
 namespace Zikula\RoutesModule\Form\Handler\Route\Base;
14 14
 
15
+use RuntimeException;
16
+use Symfony\Component\HttpFoundation\RedirectResponse;
15 17
 use Zikula\RoutesModule\Form\Handler\Common\EditHandler;
16 18
 use Zikula\RoutesModule\Form\Type\RouteType;
17 19
 
18
-use Symfony\Component\HttpFoundation\RedirectResponse;
19
-use Symfony\Component\Security\Core\Exception\AccessDeniedException;
20
-use RuntimeException;
21
-
22 20
 /**
23 21
  * This handler class handles the page events of editing forms.
24 22
  * It aims on the route object type.
Please login to merge, or discard this patch.
src/system/SettingsModule/SettingsModuleInstaller.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
         return $this->container->get('zikula_extensions_module.api.variable')->set(VariableApi::CONFIG, $name, $value);
178 178
     }
179 179
 
180
+    /**
181
+     * @param string $name
182
+     */
180 183
     private function getSystemVar($name)
181 184
     {
182 185
         return $this->container->get('zikula_extensions_module.api.variable')->getSystemVar($name);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,9 +142,9 @@
 block discarded – undo
142 142
                 $newStargArgs = str_replace(',', '&', $this->getSystemVar('startargs')); // replace comma with `&`
143 143
                 $this->setSystemVar('startargs', $newStargArgs);
144 144
             case '2.9.11':
145
-                $this->setSystemVar('shorturls', (bool) $this->getSystemVar('shorturls'));
146
-                $this->setSystemVar('shorturlsstripentrypoint', (bool) $this->getSystemVar('shorturlsstripentrypoint'));
147
-                $this->setSystemVar('useCompression', (bool) $this->getSystemVar('useCompression'));
145
+                $this->setSystemVar('shorturls', (bool)$this->getSystemVar('shorturls'));
146
+                $this->setSystemVar('shorturlsstripentrypoint', (bool)$this->getSystemVar('shorturlsstripentrypoint'));
147
+                $this->setSystemVar('useCompression', (bool)$this->getSystemVar('useCompression'));
148 148
             case '2.9.12': // ship with Core-1.4.4
149 149
                 // reconfigure TZ settings
150 150
                 $this->setGuestTimeZone();
Please login to merge, or discard this patch.
src/system/ThemeModule/Engine/AssetFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,14 +85,14 @@
 block discarded – undo
85 85
         $header .= implode("\n", $this->headers->all()) . "\n";
86 86
         $header .= ($this->scriptPosition == 'head') ? $this->jsResolver->compile() : '';
87 87
         if (strripos($source, '</head>')) {
88
-            $source = str_replace('</head>', $header."\n</head>", $source);
88
+            $source = str_replace('</head>', $header . "\n</head>", $source);
89 89
         }
90 90
 
91 91
         // compile and replace foot
92 92
         $footer = ($this->scriptPosition == 'foot') ? $this->jsResolver->compile() : '';
93 93
         $footer .= trim(implode("\n", $this->footers->all()) . "\n");
94 94
         if (false === empty($footer)) {
95
-            $source = str_replace('</body>', $footer."\n</body>", $source);
95
+            $source = str_replace('</body>', $footer . "\n</body>", $source);
96 96
         }
97 97
 
98 98
         return $source;
Please login to merge, or discard this patch.