Completed
Pull Request — master (#3788)
by Craig
01:31
created
src/system/RoutesModule/Form/Type/Base/AbstractConfigType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
                 'attr' => [
107 107
                     'maxlength' => 255,
108 108
                     'title' => $this->__('Enter the route entries per page.') . ' ' . $this->__('Only digits are allowed.')
109
-                ],'scale' => 0
109
+                ], 'scale' => 0
110 110
             ])
111 111
         ;
112 112
     }
Please login to merge, or discard this patch.
src/system/RoutesModule/Entity/Repository/Base/AbstractRouteRepository.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -407,7 +407,7 @@
 block discarded – undo
407 407
     public function getSelectWherePaginatedQuery(QueryBuilder $qb, $currentPage = 1, $resultsPerPage = 25)
408 408
     {
409 409
         $query = $this->getQueryFromBuilder($qb);
410
-        $offset = ($currentPage-1) * $resultsPerPage;
410
+        $offset = ($currentPage - 1) * $resultsPerPage;
411 411
     
412 412
         $query->setFirstResult($offset)
413 413
               ->setMaxResults($resultsPerPage);
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
     
151 151
         $qb = $this->getEntityManager()->createQueryBuilder();
152 152
         $qb->update($this->mainEntityClass, 'tbl')
153
-           ->set('tbl.createdBy', $newUserId)
154
-           ->where('tbl.createdBy = :creator')
155
-           ->setParameter('creator', $userId);
153
+            ->set('tbl.createdBy', $newUserId)
154
+            ->where('tbl.createdBy = :creator')
155
+            ->setParameter('creator', $userId);
156 156
         $query = $qb->getQuery();
157 157
         $query->execute();
158 158
     
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
     
184 184
         $qb = $this->getEntityManager()->createQueryBuilder();
185 185
         $qb->update($this->mainEntityClass, 'tbl')
186
-           ->set('tbl.updatedBy', $newUserId)
187
-           ->where('tbl.updatedBy = :editor')
188
-           ->setParameter('editor', $userId);
186
+            ->set('tbl.updatedBy', $newUserId)
187
+            ->where('tbl.updatedBy = :editor')
188
+            ->setParameter('editor', $userId);
189 189
         $query = $qb->getQuery();
190 190
         $query->execute();
191 191
     
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
     
215 215
         $qb = $this->getEntityManager()->createQueryBuilder();
216 216
         $qb->delete($this->mainEntityClass, 'tbl')
217
-           ->where('tbl.createdBy = :creator')
218
-           ->setParameter('creator', $userId);
217
+            ->where('tbl.createdBy = :creator')
218
+            ->setParameter('creator', $userId);
219 219
         $query = $qb->getQuery();
220 220
         $query->execute();
221 221
     
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
     
245 245
         $qb = $this->getEntityManager()->createQueryBuilder();
246 246
         $qb->delete($this->mainEntityClass, 'tbl')
247
-           ->where('tbl.updatedBy = :editor')
248
-           ->setParameter('editor', $userId);
247
+            ->where('tbl.updatedBy = :editor')
248
+            ->setParameter('editor', $userId);
249 249
         $query = $qb->getQuery();
250 250
         $query->execute();
251 251
     
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     {
331 331
         if (count($exclusions) > 0) {
332 332
             $qb->andWhere('tbl.id NOT IN (:excludedIdentifiers)')
333
-               ->setParameter('excludedIdentifiers', $exclusions);
333
+                ->setParameter('excludedIdentifiers', $exclusions);
334 334
         }
335 335
     
336 336
         return $qb;
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         $offset = ($currentPage-1) * $resultsPerPage;
391 391
     
392 392
         $query->setFirstResult($offset)
393
-              ->setMaxResults($resultsPerPage);
393
+                ->setMaxResults($resultsPerPage);
394 394
     
395 395
         return $query;
396 396
     }
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
     
488 488
         $qb = $this->getEntityManager()->createQueryBuilder();
489 489
         $qb->select($selection)
490
-           ->from($this->mainEntityClass, 'tbl');
490
+            ->from($this->mainEntityClass, 'tbl');
491 491
     
492 492
         if (!empty($where)) {
493 493
             $qb->andWhere($where);
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
     {
537 537
         $qb = $this->getCountQuery('', false);
538 538
         $qb->andWhere('tbl.' . $fieldName . ' = :' . $fieldName)
539
-           ->setParameter($fieldName, $fieldValue);
539
+            ->setParameter($fieldName, $fieldValue);
540 540
     
541 541
         if ($excludeId > 0) {
542 542
             $qb = $this->addExclusion($qb, [$excludeId]);
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
     
580 580
         $qb = $this->getEntityManager()->createQueryBuilder();
581 581
         $qb->select($selection)
582
-           ->from($this->mainEntityClass, 'tbl');
582
+            ->from($this->mainEntityClass, 'tbl');
583 583
     
584 584
         if (true === $useJoins) {
585 585
             $this->addJoinsToFrom($qb);
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
         if ($orderBy == 'RAND()') {
608 608
             // random selection
609 609
             $qb->addSelect('MOD(tbl.id, ' . mt_rand(2, 15) . ') AS HIDDEN randomIdentifiers')
610
-               ->add('orderBy', 'randomIdentifiers');
610
+                ->add('orderBy', 'randomIdentifiers');
611 611
     
612 612
             return $qb;
613 613
         }
@@ -626,12 +626,12 @@  discard block
 block discarded – undo
626 626
         }
627 627
         if (false !== strpos($orderBy, 'tbl.createdBy')) {
628 628
             $qb->addSelect('tblCreator')
629
-               ->leftJoin('tbl.createdBy', 'tblCreator');
629
+                ->leftJoin('tbl.createdBy', 'tblCreator');
630 630
             $orderBy = str_replace('tbl.createdBy', 'tblCreator.uname', $orderBy);
631 631
         }
632 632
         if (false !== strpos($orderBy, 'tbl.updatedBy')) {
633 633
             $qb->addSelect('tblUpdater')
634
-               ->leftJoin('tbl.updatedBy', 'tblUpdater');
634
+                ->leftJoin('tbl.updatedBy', 'tblUpdater');
635 635
             $orderBy = str_replace('tbl.updatedBy', 'tblUpdater.uname', $orderBy);
636 636
         }
637 637
         $qb->add('orderBy', $orderBy);
Please login to merge, or discard this patch.
src/system/RoutesModule/Helper/Base/AbstractCollectionFilterHelper.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -171,14 +171,14 @@  discard block
 block discarded – undo
171 171
                 if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {
172 172
                     if ($k == 'workflowState' && substr($v, 0, 1) == '!') {
173 173
                         $qb->andWhere('tbl.' . $k . ' != :' . $k)
174
-                           ->setParameter($k, substr($v, 1, strlen($v)-1));
174
+                            ->setParameter($k, substr($v, 1, strlen($v)-1));
175 175
                     } elseif (substr($v, 0, 1) == '%') {
176 176
                         $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)
177
-                           ->setParameter($k, '%' . $v . '%');
177
+                            ->setParameter($k, '%' . $v . '%');
178 178
                     } else {
179 179
                         $qb->andWhere('tbl.' . $k . ' = :' . $k)
180
-                           ->setParameter($k, $v);
181
-                   }
180
+                            ->setParameter($k, $v);
181
+                    }
182 182
                 }
183 183
             }
184 184
         }
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
     
283 283
         if (is_array($userId)) {
284 284
             $qb->andWhere('tbl.createdBy IN (:userIds)')
285
-               ->setParameter('userIds', $userId);
285
+                ->setParameter('userIds', $userId);
286 286
         } else {
287 287
             $qb->andWhere('tbl.createdBy = :userId')
288
-               ->setParameter('userId', $userId);
288
+                ->setParameter('userId', $userId);
289 289
         }
290 290
     
291 291
         return $qb;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
                 if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {
172 172
                     if ($k == 'workflowState' && substr($v, 0, 1) == '!') {
173 173
                         $qb->andWhere('tbl.' . $k . ' != :' . $k)
174
-                           ->setParameter($k, substr($v, 1, strlen($v)-1));
174
+                           ->setParameter($k, substr($v, 1, strlen($v) - 1));
175 175
                     } elseif (substr($v, 0, 1) == '%') {
176 176
                         $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)
177 177
                            ->setParameter($k, '%' . $v . '%');
Please login to merge, or discard this patch.
src/system/PermissionsModule/Tests/Api/PermissionApiTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $this->userRepo
56 56
             ->method('findByUids')
57 57
             ->with($this->anything())
58
-            ->will($this->returnCallback(function (array $uids) {
58
+            ->will($this->returnCallback(function(array $uids) {
59 59
                 $groups = [];
60 60
                 // getGroups returns [gid => $group, gid => $group, ...]
61 61
                 if (in_array(self::RANDOM_USER_ID, $uids)) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $this->currentUserApi
126 126
             ->method('get')
127 127
             ->with($this->equalTo('uid'))
128
-            ->will($this->returnCallback(function () use ($uid) {
128
+            ->will($this->returnCallback(function() use ($uid) {
129 129
                 return isset($uid) ? $uid : Constant::USER_ID_ANONYMOUS;
130 130
             }));
131 131
         $api = new PermissionApi($this->permRepo, $this->userRepo, $this->currentUserApi, $this->translator);
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
@@ -70,8 +70,8 @@
 block discarded – undo
70 70
         switch ($oldVersion) {
71 71
             case '2.3.2':
72 72
             case '2.4.0':
73
-                $this->setVar('mailwarning', (bool) $this->getVar('mailwarning'));
74
-                $this->setVar('hideclosed', (bool) $this->getVar('hideclosed'));
73
+                $this->setVar('mailwarning', (bool)$this->getVar('mailwarning'));
74
+                $this->setVar('hideclosed', (bool)$this->getVar('hideclosed'));
75 75
                 $this->setVar('hidePrivate', false);
76 76
             case '2.4.1':
77 77
                 /** @var UserEntity $anonymousUser */
Please login to merge, or discard this patch.
src/system/UsersModule/Twig/Extension/OnlineExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,6 +69,6 @@
 block discarded – undo
69 69
             ->andWhere(Criteria::expr()->gt('lastused', $since));
70 70
         $online = $this->sessionRepository->matching($c)->count();
71 71
 
72
-        return (bool) $online;
72
+        return (bool)$online;
73 73
     }
74 74
 }
Please login to merge, or discard this patch.
src/system/RoutesModule/Form/Handler/Common/Base/AbstractEditHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@
 block discarded – undo
292 292
         $routeParams = $this->request->get('_route_params', []);
293 293
         if (empty($this->idValue)) {
294 294
             if (array_key_exists($this->idField, $routeParams)) {
295
-                $this->idValue = (int) !empty($routeParams[$this->idField]) ? $routeParams[$this->idField] : 0;
295
+                $this->idValue = (int)!empty($routeParams[$this->idField]) ? $routeParams[$this->idField] : 0;
296 296
             }
297 297
             if (0 === $this->idValue) {
298 298
                 $this->idValue = $this->request->query->getInt($this->idField, 0);
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
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         parent::__construct($kernel);
35 35
 
36 36
         $this->setName('Zikula');
37
-        $this->setVersion(ZikulaKernel::VERSION.' - '.$kernel->getName().'/'.$kernel->getEnvironment().($kernel->isDebug() ? '/debug' : ''));
37
+        $this->setVersion(ZikulaKernel::VERSION . ' - ' . $kernel->getName() . '/' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : ''));
38 38
     }
39 39
 
40 40
     protected function registerCommands()
Please login to merge, or discard this patch.
src/system/ZAuthModule/Form/Type/LostPasswordType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         $resolver->setDefaults([
85 85
             'translator' => null,
86 86
             'includeReset' => false,
87
-            'constraints' => new Callback(['callback' => function ($data, ExecutionContextInterface $context) use ($resolver) {
87
+            'constraints' => new Callback(['callback' => function($data, ExecutionContextInterface $context) use ($resolver) {
88 88
                 if (!isset($data['pass']) && empty($data['uname']) && empty($data['email'])) {
89 89
                     $context->buildViolation('Error! You must enter either your username or email address.')
90 90
                         ->addViolation();
Please login to merge, or discard this patch.