Completed
Push — master ( 8e6dfe...ada09b )
by Craig
07:23
created
src/system/PermissionsModule/Twig/Extension/PermissionsExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,6 +62,6 @@
 block discarded – undo
62 62
 
63 63
         $result = $this->container->get('zikula_permissions_module.api.permission')->hasPermission($component, $instance, constant($level));
64 64
 
65
-        return (bool) $result;
65
+        return (bool)$result;
66 66
     }
67 67
 }
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/lib/Zikula/Bundle/CoreBundle/Twig/Extension/PagerExtension.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     case 'lang':
140 140
                         $addcurrentlang2url = $systemVars['languageurl'];
141 141
                         if ($addcurrentlang2url == 0) {
142
-                            $pager['args'][$k] =  $v;
142
+                            $pager['args'][$k] = $v;
143 143
                         }
144 144
                         break;
145 145
                     default:
@@ -161,19 +161,19 @@  discard block
 block discarded – undo
161 161
                                     }
162 162
                                 } elseif (strlen($vv)) {
163 163
                                     $tkey = $k . '[' . $kk . ']';
164
-                                    $pager['args'][$tkey] =  $vv;
164
+                                    $pager['args'][$tkey] = $vv;
165 165
                                 }
166 166
                             }
167 167
                         } else {
168 168
                             if (strlen($v)) {
169
-                                $pager['args'][$k] =  $v;
169
+                                $pager['args'][$k] = $v;
170 170
                             }
171 171
                         }
172 172
                 }
173 173
             }
174 174
         }
175 175
 
176
-        $pagerUrl = function ($pager) use ($routeName, $systemVars) {
176
+        $pagerUrl = function($pager) use ($routeName, $systemVars) {
177 177
             if ($routeName) {
178 178
                 return $this->container->get('router')->generate($routeName, $pager['args']);
179 179
             }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             // predefined abc
374 374
             if (strtolower($params['skin']) == 'hu') {
375 375
                 // Hungarian
376
-                $pager['names']  = $pager['values'] = ['A', '?', 'B', 'C', 'D', 'E', '?', 'F', 'G', 'H', 'I', '?', 'J', 'K', 'L', 'M', 'N', 'O', '?', '?', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', '?', '?', 'U', 'V', 'W', 'X', 'Y', 'Z'];
376
+                $pager['names'] = $pager['values'] = ['A', '?', 'B', 'C', 'D', 'E', '?', 'F', 'G', 'H', 'I', '?', 'J', 'K', 'L', 'M', 'N', 'O', '?', '?', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', '?', '?', 'U', 'V', 'W', 'X', 'Y', 'Z'];
377 377
                 //$params['names']  = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'    ,'V','W','X','Y','Z');
378 378
                 //$params['values'] = array('A,?','B','C','D','E,?','F','G','H','I,?','J','K','L','M','N','O,?,?,O','P','Q','R','S','T','U,?,?,U','V','W','X','Y','Z');
379 379
             } else {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         unset($params['names']);
388 388
         unset($params['values']);
389 389
         unset($params['route']);
390
-        $pagerUrl = function ($pager) {
390
+        $pagerUrl = function($pager) {
391 391
             return $this->container->get('router')->generate($pager['route'], $pager['args']);
392 392
         };
393 393
         $allVars = array_merge($request->request->all(), $request->query->all(), $request->attributes->get('_route_params', []));
@@ -418,38 +418,38 @@  discard block
 block discarded – undo
418 418
         }
419 419
         unset($pager['args'][$pager['posvar']]);
420 420
         // begin to fill the output
421
-        $output = '<ul class="'.$params['class'].'">'."\n";
421
+        $output = '<ul class="' . $params['class'] . '">' . "\n";
422 422
         $style = '';
423 423
         if ($params['printempty']) {
424 424
             $active = '';
425 425
             if (!empty($params['class_numon'])) {
426 426
                 if (!isset($allVars[$pager['posvar']])) {
427
-                    $style = ' class="'.$params['class_numon'].'"';
427
+                    $style = ' class="' . $params['class_numon'] . '"';
428 428
                     $active = 'class="active"';
429 429
                 } elseif (!empty($params['class_num'])) {
430
-                    $style = ' class="'.$params['class_num'].'"';
430
+                    $style = ' class="' . $params['class_num'] . '"';
431 431
                 } else {
432 432
                     $style = '';
433 433
                 }
434 434
             }
435 435
             $vars[$pager['posvar']] = '';
436
-            $output .= '<li '.$active.'><a '.$style.' href="'.$pagerUrl($pager).'"> -'."\n</a></li>";
436
+            $output .= '<li ' . $active . '><a ' . $style . ' href="' . $pagerUrl($pager) . '"> -' . "\n</a></li>";
437 437
         }
438 438
         $style = '';
439 439
         foreach (array_keys($pager['names']) as $i) {
440 440
             $active = '';
441 441
             if (!empty($params['class_numon'])) {
442 442
                 if (isset($allVars[$pager['posvar']]) && $allVars[$pager['posvar']] == $pager['values'][$i]) {
443
-                    $style = ' class="'.$params['class_numon'].'"';
443
+                    $style = ' class="' . $params['class_numon'] . '"';
444 444
                     $active = 'class="active"';
445 445
                 } elseif (!empty($params['class_num'])) {
446
-                    $style = ' class="'.$params['class_num'].'"';
446
+                    $style = ' class="' . $params['class_num'] . '"';
447 447
                 } else {
448 448
                     $style = '';
449 449
                 }
450 450
             }
451 451
             $pager['args'][$pager['posvar']] = $pager['values'][$i];
452
-            $output .= '<li '.$active.'><a '.$style.' href="'.$pagerUrl($pager).'">'.$pager['names'][$i]."</a></li>\n";
452
+            $output .= '<li ' . $active . '><a ' . $style . ' href="' . $pagerUrl($pager) . '">' . $pager['names'][$i] . "</a></li>\n";
453 453
         }
454 454
         $output .= "</ul>\n";
455 455
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     /**
48 48
      * Returns a list of functions to add to the existing list.
49 49
      *
50
-     * @return array An array of functions
50
+     * @return \Twig_SimpleFunction[] An array of functions
51 51
      */
52 52
     public function getFunctions()
53 53
     {
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
@@ -59,11 +59,11 @@
 block discarded – undo
59 59
         $availableLanguages = [];
60 60
         foreach ($matches as $match) {
61 61
             list($languageCode, $unusedVar) = explode('-', $match[1]) + ['', ''];
62
-            $priority = isset($match[2]) ? (float) $match[2] : 1.0;
62
+            $priority = isset($match[2]) ? (float)$match[2] : 1.0;
63 63
             $availableLanguages[][$languageCode] = $priority;
64 64
         }
65 65
 
66
-        $defaultPriority = (float) 0;
66
+        $defaultPriority = (float)0;
67 67
         $matchedLanguage = '';
68 68
         foreach ($availableLanguages as $key => $value) {
69 69
             $languageCode = key($value);
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Entity/Repository/ExtensionRepository.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -53,6 +53,9 @@  discard block
 block discarded – undo
53 53
         return $paginator;
54 54
     }
55 55
 
56
+    /**
57
+     * @param string $indexBy
58
+     */
56 59
     public function getIndexedArrayCollection($indexBy)
57 60
     {
58 61
         $qb = $this->createQueryBuilder('e')->indexBy('e', 'e.' . $indexBy);
@@ -78,6 +81,9 @@  discard block
 block discarded – undo
78 81
         $this->_em->flush($entity);
79 82
     }
80 83
 
84
+    /**
85
+     * @param ExtensionEntity $entity
86
+     */
81 87
     public function removeAndFlush($entity)
82 88
     {
83 89
         $this->_em->remove($entity);
Please login to merge, or discard this patch.
src/system/RoutesModule/Form/Handler/Route/Base/AbstractEditHandler.php 2 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.
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.
src/system/MenuModule/DependencyInjection/ZikulaMenuExtension.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.