Completed
Pull Request — master (#3527)
by Craig
10:00
created
src/system/RoutesModule/Base/AbstractRoutesModuleInstaller.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
     /**
130 130
      * Build array with all entity classes for ZikulaRoutesModule.
131 131
      *
132
-     * @return array list of class names
132
+     * @return string[] list of class names
133 133
      */
134 134
     protected function listEntityClasses()
135 135
     {
Please login to merge, or discard this patch.
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/system/GroupsModule/GroupsModuleInstaller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
         switch ($oldVersion) {
67 67
             case '2.3.2':
68 68
             case '2.4.0':
69
-                $this->setVar('mailwarning', (bool) $this->getVar('mailwarning'));
70
-                $this->setVar('hideclosed', (bool) $this->getVar('hideclosed'));
69
+                $this->setVar('mailwarning', (bool)$this->getVar('mailwarning'));
70
+                $this->setVar('hideclosed', (bool)$this->getVar('hideclosed'));
71 71
                 $this->setVar('hidePrivate', false);
72 72
             case '2.4.1':
73 73
             // future upgrade routines
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/AdminModule/Controller/AdminInterfaceController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
                     $ldir = dirname(__FILE__);
183 183
                     $p = strpos($ldir, DIRECTORY_SEPARATOR . 'system'); // we are in system/AdminModule
184 184
                     $b = substr($ldir, 0, $p);
185
-                    $filePath = $b.'/'.$appDir.'/.htaccess';
185
+                    $filePath = $b . '/' . $appDir . '/.htaccess';
186 186
                 } else {
187
-                    $filePath = $appDir.'/.htaccess';
187
+                    $filePath = $appDir . '/.htaccess';
188 188
                 }
189 189
                 $app_htaccess = file_exists($filePath);
190 190
             }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         return $this->render('@ZikulaAdminModule/AdminInterface/securityAnalyzer.html.twig', [
200 200
             'security' => [
201 201
                 'config_php' => is_writable('config/config.php'),
202
-                'magic_quotes_gpc' => (bool) get_magic_quotes_gpc(), // should be off anyway...
202
+                'magic_quotes_gpc' => (bool)get_magic_quotes_gpc(), // should be off anyway...
203 203
                 'app_htaccess' => $app_htaccess,
204 204
                 'updatecheck' => $variableApi->getSystemVar('updatecheck'),
205 205
                 'scactive' => $hasSecurityCenter,
Please login to merge, or discard this patch.
src/system/UsersModule/Twig/Extension/ProfileExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
             // truncate the user name to $maxLength chars
144 144
             $length = strlen($userDisplayName);
145 145
             $truncEnd = ($maxLength > $length) ? $length : $maxLength;
146
-            $show  = htmlspecialchars(substr($userDisplayName, 0, $truncEnd), ENT_QUOTES);
146
+            $show = htmlspecialchars(substr($userDisplayName, 0, $truncEnd), ENT_QUOTES);
147 147
         } else {
148 148
             $show = htmlspecialchars($userDisplayName, ENT_QUOTES);
149 149
         }
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Console/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $this->kernel = $kernel;
34 34
 
35 35
         $this->setName('Zikula');
36
-        $this->setVersion(ZikulaKernel::VERSION.' - '.$kernel->getName().'/'.$kernel->getEnvironment().($kernel->isDebug() ? '/debug' : ''));
36
+        $this->setVersion(ZikulaKernel::VERSION . ' - ' . $kernel->getName() . '/' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : ''));
37 37
     }
38 38
 
39 39
     protected function registerCommands()
Please login to merge, or discard this patch.