Completed
Push — master ( f1d9df...fe9150 )
by Craig
07:11
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/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/lib/Zikula/Bundle/CoreInstallerBundle/Util/ZikulaRequirements.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function runSymfonyChecks($parameters = [])
25 25
     {
26 26
         try {
27
-            $path = realpath(__DIR__.'/../../../../../var/SymfonyRequirements.php');
27
+            $path = realpath(__DIR__ . '/../../../../../var/SymfonyRequirements.php');
28 28
             require $path;
29 29
             $symfonyRequirements = new \SymfonyRequirements();
30 30
             $this->addZikulaPathRequirements($symfonyRequirements, $parameters);
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
         if ($requirement->isFulfilled()) {
45 45
             return;
46 46
         }
47
-        $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.'   ').PHP_EOL;
48
-        $errorMessage .= '   > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.'   > ').PHP_EOL;
47
+        $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL . '   ') . PHP_EOL;
48
+        $errorMessage .= '   > ' . wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL . '   > ') . PHP_EOL;
49 49
 
50 50
         return $errorMessage;
51 51
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $symfonyRequirements->addRequirement(
67 67
             is_writable($src . '/' . $parameters['datadir']),
68 68
             $parameters['datadir'] . '/ directory must be writable',
69
-            'Change the permissions of "<strong>' . $parameters['datadir']. '</strong>" directory so that the web server can write into it.'
69
+            'Change the permissions of "<strong>' . $parameters['datadir'] . '</strong>" directory so that the web server can write into it.'
70 70
         );
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
src/system/BlocksModule/Twig/Extension/BlocksExtension.php 1 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/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.