Completed
Push — master ( 5247c6...b8f763 )
by Craig
10:35 queued 03:41
created
src/system/SecurityCenterModule/SecurityCenterModuleInstaller.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this->setSystemVar('sessionstoretofile', 0);
55 55
         $this->setSystemVar('sessionsavepath', '');
56 56
         $this->setSystemVar('gc_probability', 100);
57
-        $this->setSystemVar('sessioncsrftokenonetime', 1);  // 1 means use same token for entire session
57
+        $this->setSystemVar('sessioncsrftokenonetime', 1); // 1 means use same token for entire session
58 58
         $this->setSystemVar('anonymoussessions', 1); // @deprecated
59 59
         $this->setSystemVar('sessionrandregenerate', 1);
60 60
         $this->setSystemVar('sessionregenerate', 1);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $this->setSystemVar('filtercookievars', 1);
68 68
 
69 69
         // Location of HTML Purifier
70
-        $this->setSystemVar('htmlpurifierlocation', __DIR__.'/vendor/htmlpurifier/');
70
+        $this->setSystemVar('htmlpurifierlocation', __DIR__ . '/vendor/htmlpurifier/');
71 71
 
72 72
         // HTML Purifier cache dir
73 73
         $this->container->get('cache_clearer')->clear('purifier');
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
         $this->setSystemVar('useids', 0);
81 81
         $this->setSystemVar('idsmail', 0);
82 82
         $this->setSystemVar('idsrulepath', __DIR__ . '/Resources/config/phpids_zikula_default.xml');
83
-        $this->setSystemVar('idssoftblock', 1);                // do not block requests, but warn for debugging
84
-        $this->setSystemVar('idsfilter', 'xml');               // filter type
85
-        $this->setSystemVar('idsimpactthresholdone', 1);       // db logging
86
-        $this->setSystemVar('idsimpactthresholdtwo', 10);      // mail admin
87
-        $this->setSystemVar('idsimpactthresholdthree', 25);    // block request
88
-        $this->setSystemVar('idsimpactthresholdfour', 75);     // kick user, destroy session
89
-        $this->setSystemVar('idsimpactmode', 1);               // per request per default
83
+        $this->setSystemVar('idssoftblock', 1); // do not block requests, but warn for debugging
84
+        $this->setSystemVar('idsfilter', 'xml'); // filter type
85
+        $this->setSystemVar('idsimpactthresholdone', 1); // db logging
86
+        $this->setSystemVar('idsimpactthresholdtwo', 10); // mail admin
87
+        $this->setSystemVar('idsimpactthresholdthree', 25); // block request
88
+        $this->setSystemVar('idsimpactthresholdfour', 75); // kick user, destroy session
89
+        $this->setSystemVar('idsimpactmode', 1); // per request per default
90 90
         $this->setSystemVar('idshtmlfields', ['POST.__wysiwyg']);
91 91
         $this->setSystemVar('idsjsonfields', ['POST.__jsondata']);
92 92
         $this->setSystemVar('idsexceptions', [
Please login to merge, or discard this patch.
src/system/RoutesModule/Controller/Base/AbstractAdminController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      *
37 37
      * @param Request  $request      Current request instance
38 38
      *
39
-     * @return mixed Output
39
+     * @return RedirectResponse Output
40 40
      *
41 41
      * @throws AccessDeniedException Thrown if the user doesn't have required permissions
42 42
      */
Please login to merge, or discard this patch.
src/system/RoutesModule/Controller/Base/AbstractUserController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      *
37 37
      * @param Request  $request      Current request instance
38 38
      *
39
-     * @return mixed Output
39
+     * @return RedirectResponse Output
40 40
      *
41 41
      * @throws AccessDeniedException Thrown if the user doesn't have required permissions
42 42
      */
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/AbstractController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     /**
76
-     * @param $moduleName
76
+     * @param string $moduleName
77 77
      * @return bool
78 78
      */
79 79
     protected function installModule($moduleName)
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * Set an admin category for a module
121 121
      * @param $moduleName
122
-     * @param $translatedCategoryName
122
+     * @param string $translatedCategoryName
123 123
      */
124 124
     protected function setModuleCategory($moduleName, $translatedCategoryName)
125 125
     {
Please login to merge, or discard this patch.
src/system/RoutesModule/Entity/Repository/Base/AbstractRouteRepository.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -280,9 +280,9 @@  discard block
 block discarded – undo
280 280
     
281 281
         $qb = $this->getEntityManager()->createQueryBuilder();
282 282
         $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
283
-           ->set('tbl.createdBy', $newUserId)
284
-           ->where('tbl.createdBy= :creator')
285
-           ->setParameter('creator', $userId);
283
+            ->set('tbl.createdBy', $newUserId)
284
+            ->where('tbl.createdBy= :creator')
285
+            ->setParameter('creator', $userId);
286 286
         $query = $qb->getQuery();
287 287
         $query->execute();
288 288
     
@@ -313,9 +313,9 @@  discard block
 block discarded – undo
313 313
     
314 314
         $qb = $this->getEntityManager()->createQueryBuilder();
315 315
         $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
316
-           ->set('tbl.updatedBy', $newUserId)
317
-           ->where('tbl.updatedBy = :editor')
318
-           ->setParameter('editor', $userId);
316
+            ->set('tbl.updatedBy', $newUserId)
317
+            ->where('tbl.updatedBy = :editor')
318
+            ->setParameter('editor', $userId);
319 319
         $query = $qb->getQuery();
320 320
         $query->execute();
321 321
     
@@ -344,8 +344,8 @@  discard block
 block discarded – undo
344 344
     
345 345
         $qb = $this->getEntityManager()->createQueryBuilder();
346 346
         $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
347
-           ->where('tbl.createdBy = :creator')
348
-           ->setParameter('creator', $userId);
347
+            ->where('tbl.createdBy = :creator')
348
+            ->setParameter('creator', $userId);
349 349
         $query = $qb->getQuery();
350 350
     
351 351
         $query->execute();
@@ -375,8 +375,8 @@  discard block
 block discarded – undo
375 375
     
376 376
         $qb = $this->getEntityManager()->createQueryBuilder();
377 377
         $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
378
-           ->where('tbl.updatedBy = :editor')
379
-           ->setParameter('editor', $userId);
378
+            ->where('tbl.updatedBy = :editor')
379
+            ->setParameter('editor', $userId);
380 380
         $query = $qb->getQuery();
381 381
     
382 382
         $query->execute();
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     {
473 473
         if ($excludeId > 0) {
474 474
             $qb->andWhere('tbl.id != :excludeId')
475
-               ->setParameter('excludeId', $excludeId);
475
+                ->setParameter('excludeId', $excludeId);
476 476
         }
477 477
     
478 478
         return $qb;
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
         $offset = ($currentPage-1) * $resultsPerPage;
535 535
     
536 536
         $query->setFirstResult($offset)
537
-              ->setMaxResults($resultsPerPage);
537
+                ->setMaxResults($resultsPerPage);
538 538
     
539 539
         return $query;
540 540
     }
@@ -600,14 +600,14 @@  discard block
 block discarded – undo
600 600
                 if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {
601 601
                     if ($k == 'workflowState' && substr($v, 0, 1) == '!') {
602 602
                         $qb->andWhere('tbl.' . $k . ' != :' . $k)
603
-                           ->setParameter($k, substr($v, 1, strlen($v)-1));
603
+                            ->setParameter($k, substr($v, 1, strlen($v)-1));
604 604
                     } elseif (substr($v, 0, 1) == '%') {
605 605
                         $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)
606
-                           ->setParameter($k, '%' . $v . '%');
606
+                            ->setParameter($k, '%' . $v . '%');
607 607
                     } else {
608 608
                         $qb->andWhere('tbl.' . $k . ' = :' . $k)
609
-                           ->setParameter($k, $v);
610
-                   }
609
+                            ->setParameter($k, $v);
610
+                    }
611 611
                 }
612 612
             }
613 613
         }
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
     {
648 648
         $qb = $this->genericBaseQuery('', $orderBy, $useJoins);
649 649
         if (count($exclude) > 0) {
650
-        	$qb = $this->addExclusion($qb, $exclude);
650
+            $qb = $this->addExclusion($qb, $exclude);
651 651
         }
652 652
     
653 653
         $qb = $this->addSearchFilter($qb, $fragment);
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
     
788 788
         $qb = $this->getEntityManager()->createQueryBuilder();
789 789
         $qb->select($selection)
790
-           ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
790
+            ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
791 791
     
792 792
         if (true === $useJoins) {
793 793
             $this->addJoinsToFrom($qb);
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
     {
833 833
         $qb = $this->getCountQuery('', false);
834 834
         $qb->andWhere('tbl.' . $fieldName . ' = :' . $fieldName)
835
-           ->setParameter($fieldName, $fieldValue);
835
+            ->setParameter($fieldName, $fieldValue);
836 836
     
837 837
         $qb = $this->addExclusion($qb, $excludeId);
838 838
     
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
     
879 879
         $qb = $this->getEntityManager()->createQueryBuilder();
880 880
         $qb->select($selection)
881
-           ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
881
+            ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
882 882
     
883 883
         if (true === $useJoins) {
884 884
             $this->addJoinsToFrom($qb);
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
             
957 957
             $userId = $this->getRequest()->getSession()->get('uid');
958 958
             $qb->andWhere('tbl.createdBy = :creator')
959
-               ->setParameter('creator', $userId);
959
+                ->setParameter('creator', $userId);
960 960
         }
961 961
     
962 962
         return $qb;
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
         if ($orderBy == 'RAND()') {
976 976
             // random selection
977 977
             $qb->addSelect('MOD(tbl.id, ' . mt_rand(2, 15) . ') AS HIDDEN randomIdentifiers')
978
-               ->add('orderBy', 'randomIdentifiers');
978
+                ->add('orderBy', 'randomIdentifiers');
979 979
             $orderBy = '';
980 980
         } elseif (empty($orderBy)) {
981 981
             $orderBy = $this->defaultSortingField;
Please login to merge, or discard this patch.
src/system/RoutesModule/Form/Handler/Route/Base/AbstractEditHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
         try {
217 217
             // execute the workflow action
218 218
             $success = $this->workflowHelper->executeAction($entity, $action);
219
-        } catch(\Exception $e) {
219
+        } catch (\Exception $e) {
220 220
             $flashBag->add('error', $this->__f('Sorry, but an error occured during the %action% action. Please apply the changes again!', ['%action%' => $action]) . ' ' . $e->getMessage());
221 221
             $logArgs = ['app' => 'ZikulaRoutesModule', 'user' => $this->currentUserApi->get('uname'), 'entity' => 'route', 'id' => $entity->createCompositeIdentifier(), 'errorMessage' => $e->getMessage()];
222 222
             $this->logger->error('{app}: User {user} tried to edit the {entity} with id {id}, but failed. Error details: {errorMessage}.', $logArgs);
Please login to merge, or discard this patch.
src/system/RoutesModule/Form/Type/Base/AbstractRouteType.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             'attr' => [
101 101
                 'class' => '',
102 102
                 'title' => $this->__('Choose the route type')
103
-            ],'choices' => $choices,
103
+            ], 'choices' => $choices,
104 104
             'choice_attr' => $choiceAttributes,
105 105
             'multiple' => false,
106 106
             'expanded' => false
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 'maxlength' => 255,
113 113
                 'class' => '',
114 114
                 'title' => $this->__('Enter the replaced route name of the route')
115
-            ],'required' => false,
115
+            ], 'required' => false,
116 116
         ]);
117 117
         $builder->add('bundle', TextType::class, [
118 118
             'label' => $this->__('Bundle') . ':',
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 'maxlength' => 255,
122 122
                 'class' => '',
123 123
                 'title' => $this->__('Enter the bundle of the route')
124
-            ],'required' => true,
124
+            ], 'required' => true,
125 125
         ]);
126 126
         $builder->add('controller', TextType::class, [
127 127
             'label' => $this->__('Controller') . ':',
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 'maxlength' => 255,
131 131
                 'class' => '',
132 132
                 'title' => $this->__('Enter the controller of the route')
133
-            ],'required' => true,
133
+            ], 'required' => true,
134 134
         ]);
135 135
         $builder->add('action', TextType::class, [
136 136
             'label' => $this->__('Action') . ':',
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 'maxlength' => 255,
140 140
                 'class' => '',
141 141
                 'title' => $this->__('Enter the action of the route')
142
-            ],'required' => true,
142
+            ], 'required' => true,
143 143
         ]);
144 144
         $builder->add('path', TextType::class, [
145 145
             'label' => $this->__('Path') . ':',
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 'maxlength' => 255,
149 149
                 'class' => '',
150 150
                 'title' => $this->__('Enter the path of the route')
151
-            ],'required' => true,
151
+            ], 'required' => true,
152 152
         ]);
153 153
         $builder->add('host', TextType::class, [
154 154
             'label' => $this->__('Host') . ':',
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 'maxlength' => 255,
158 158
                 'class' => '',
159 159
                 'title' => $this->__('Enter the host of the route')
160
-            ],'required' => false,
160
+            ], 'required' => false,
161 161
         ]);
162 162
 
163 163
         $listEntries = $this->listHelper->getEntries('route', 'schemes');
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             'attr' => [
174 174
                 'class' => '',
175 175
                 'title' => $this->__('Choose the schemes')
176
-            ],'choices' => $choices,
176
+            ], 'choices' => $choices,
177 177
             'choice_attr' => $choiceAttributes,
178 178
             'multiple' => true,
179 179
             'expanded' => false
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             'attr' => [
193 193
                 'class' => '',
194 194
                 'title' => $this->__('Choose the methods')
195
-            ],'choices' => $choices,
195
+            ], 'choices' => $choices,
196 196
             'choice_attr' => $choiceAttributes,
197 197
             'multiple' => true,
198 198
             'expanded' => false
@@ -202,14 +202,14 @@  discard block
 block discarded – undo
202 202
             'attr' => [
203 203
                 'class' => '',
204 204
                 'title' => $this->__('prepend bundle prefix ?')
205
-            ],'required' => true,
205
+            ], 'required' => true,
206 206
         ]);
207 207
         $builder->add('translatable', CheckboxType::class, [
208 208
             'label' => $this->__('Translatable') . ':',
209 209
             'attr' => [
210 210
                 'class' => '',
211 211
                 'title' => $this->__('translatable ?')
212
-            ],'required' => true,
212
+            ], 'required' => true,
213 213
         ]);
214 214
         $builder->add('translationPrefix', TextType::class, [
215 215
             'label' => $this->__('Translation prefix') . ':',
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 'maxlength' => 255,
219 219
                 'class' => '',
220 220
                 'title' => $this->__('Enter the translation prefix of the route')
221
-            ],'required' => false,
221
+            ], 'required' => false,
222 222
         ]);
223 223
         $builder->add('condition', TextType::class, [
224 224
             'label' => $this->__('Condition') . ':',
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                 'maxlength' => 255,
228 228
                 'class' => '',
229 229
                 'title' => $this->__('Enter the condition of the route')
230
-            ],'required' => false,
230
+            ], 'required' => false,
231 231
         ]);
232 232
         $builder->add('description', TextType::class, [
233 233
             'label' => $this->__('Description') . ':',
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                 'maxlength' => 255,
237 237
                 'class' => '',
238 238
                 'title' => $this->__('Enter the description of the route')
239
-            ],'required' => false,
239
+            ], 'required' => false,
240 240
         ]);
241 241
         $builder->add('sort', IntegerType::class, [
242 242
             'label' => $this->__('Sort') . ':',
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                 'maxlength' => 255,
246 246
                 'class' => ' validate-digits',
247 247
                 'title' => $this->__('Enter the sort of the route. Only digits are allowed.')
248
-            ],'required' => false,
248
+            ], 'required' => false,
249 249
             'maxlength' => 11,
250 250
             'scale' => 0
251 251
         ]);
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 'maxlength' => 255,
257 257
                 'class' => '',
258 258
                 'title' => $this->__('Enter the group of the route')
259
-            ],'required' => false,
259
+            ], 'required' => false,
260 260
         ]);
261 261
     }
262 262
 
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
             ->setDefaults([
332 332
                 // define class for underlying data (required for embedding forms)
333 333
                 'data_class' => 'Zikula\RoutesModule\Entity\RouteEntity',
334
-                'empty_data' => function (FormInterface $form) {
334
+                'empty_data' => function(FormInterface $form) {
335 335
                     return $this->entityFactory->createRoute();
336 336
                 },
337 337
                 'error_mapping' => [
Please login to merge, or discard this patch.
src/system/RoutesModule/Controller/Base/AbstractRouteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -615,7 +615,7 @@
 block discarded – undo
615 615
                 }
616 616
                 // execute the workflow action
617 617
                 $success = $workflowHelper->executeAction($entity, $action);
618
-            } catch(\Exception $e) {
618
+            } catch (\Exception $e) {
619 619
                 $this->addFlash('error', $this->__f('Sorry, but an error occured during the %s action.', ['%s' => $action]) . '  ' . $e->getMessage());
620 620
                 $logger->error('{app}: User {user} tried to execute the {action} workflow action for the {entity} with id {id}, but failed. Error details: {errorMessage}.', ['app' => 'ZikulaRoutesModule', 'user' => $userName, 'action' => $action, 'entity' => 'route', 'id' => $itemid, 'errorMessage' => $e->getMessage()]);
621 621
             }
Please login to merge, or discard this patch.